aboutsummaryrefslogtreecommitdiffstats
path: root/tests/security/base.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-09-19 11:49:13 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2013-09-19 11:49:13 -0500
commit2ee22d4615a86a33d3c65f94d7a9c4b99dfb1b7e (patch)
tree914249f2e1d6d4e28a073d20f898a03aaa69f5f8 /tests/security/base.php
parentd85ae0f7bc0bd9663eda83c6713f0ef71289b0f4 (diff)
downloadforums-2ee22d4615a86a33d3c65f94d7a9c4b99dfb1b7e.tar
forums-2ee22d4615a86a33d3c65f94d7a9c4b99dfb1b7e.tar.gz
forums-2ee22d4615a86a33d3c65f94d7a9c4b99dfb1b7e.tar.bz2
forums-2ee22d4615a86a33d3c65f94d7a9c4b99dfb1b7e.tar.xz
forums-2ee22d4615a86a33d3c65f94d7a9c4b99dfb1b7e.zip
[ticket/11850] Fix extract current page test
PHPBB3-11850
Diffstat (limited to 'tests/security/base.php')
-rw-r--r--tests/security/base.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/security/base.php b/tests/security/base.php
index 08878ad60d..c7dbbb550a 100644
--- a/tests/security/base.php
+++ b/tests/security/base.php
@@ -14,7 +14,7 @@ abstract class phpbb_security_test_base extends phpbb_test_case
*/
protected function setUp()
{
- global $user, $phpbb_root_path, $request;
+ global $user, $phpbb_root_path, $phpEx, $request, $symfony_request, $phpbb_filesystem;
// Put this into a global function being run by every test to init a proper user session
$server['HTTP_HOST'] = 'localhost';
@@ -37,6 +37,22 @@ abstract class phpbb_security_test_base extends phpbb_test_case
*/
$request = new phpbb_mock_request(array(), array(), array(), $server);
+ $symfony_request = $this->getMock("phpbb_symfony_request", array(), array(
+ $request,
+ ));
+ $symfony_request->expects($this->any())
+ ->method('getScriptName')
+ ->will($this->returnValue($server['SCRIPT_NAME']));
+ $symfony_request->expects($this->any())
+ ->method('getQueryString')
+ ->will($this->returnValue($server['QUERY_STRING']));
+ $symfony_request->expects($this->any())
+ ->method('getBasePath')
+ ->will($this->returnValue($server['REQUEST_URI']));
+ $symfony_request->expects($this->any())
+ ->method('getPathInfo')
+ ->will($this->returnValue('/'));
+ $phpbb_filesystem = new phpbb_filesystem($symfony_request, $phpbb_root_path, $phpEx);
// Set no user and trick a bit to circumvent errors
$user = new phpbb_user();