diff options
author | Maat <maat-pub@mageia.biz> | 2020-05-08 21:52:11 +0200 |
---|---|---|
committer | Maat <maat-pub@mageia.biz> | 2020-05-08 21:52:11 +0200 |
commit | 8ea437e30605e0f66b5220bf904a61d7c1d11ddd (patch) | |
tree | e0db2bb4a012d5b06a633160b19f62f4868ecd28 /tests/security | |
parent | 36bc1870f21fac04736a1049c1d5b8e127d729f4 (diff) | |
parent | 2fdd46b36431ae0f58bb2e78e42553168db9a0ff (diff) | |
download | forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.gz forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.bz2 forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.xz forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.zip |
Merge remote-tracking branch 'upstream/prep-release-3.2.9'
Diffstat (limited to 'tests/security')
-rw-r--r-- | tests/security/base.php | 6 | ||||
-rw-r--r-- | tests/security/extract_current_page_test.php | 1 | ||||
-rw-r--r-- | tests/security/hash_test.php | 2 | ||||
-rw-r--r-- | tests/security/redirect_test.php | 5 |
4 files changed, 6 insertions, 8 deletions
diff --git a/tests/security/base.php b/tests/security/base.php index 330408b448..d2abdbc362 100644 --- a/tests/security/base.php +++ b/tests/security/base.php @@ -46,10 +46,12 @@ abstract class phpbb_security_test_base extends phpbb_test_case $request = new phpbb_mock_request(array(), array(), array(), $this->server); $symfony_request = new \phpbb\symfony_request($request); - $phpbb_filesystem = new \phpbb\filesystem(); + $phpbb_filesystem = new \phpbb\filesystem\filesystem(); // Set no user and trick a bit to circumvent errors - $user = new \phpbb\user('\phpbb\datetime'); + $lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx); + $lang = new \phpbb\language\language($lang_loader); + $user = new \phpbb\user($lang, '\phpbb\datetime'); $user->lang = true; $user->browser = $this->server['HTTP_USER_AGENT']; $user->referer = ''; diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php index 767b901a43..f764449eca 100644 --- a/tests/security/extract_current_page_test.php +++ b/tests/security/extract_current_page_test.php @@ -13,7 +13,6 @@ require_once dirname(__FILE__) . '/base.php'; -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_security_extract_current_page_test extends phpbb_security_test_base { diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php index 0494c55c6d..84d4fcf479 100644 --- a/tests/security/hash_test.php +++ b/tests/security/hash_test.php @@ -11,8 +11,6 @@ * */ -require_once dirname(__FILE__) . '/../../phpBB/includes/functions_compatibility.php'; - class phpbb_security_hash_test extends phpbb_test_case { public function setUp() diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php index a88fc63858..0177eb4259 100644 --- a/tests/security/redirect_test.php +++ b/tests/security/redirect_test.php @@ -13,7 +13,6 @@ require_once dirname(__FILE__) . '/base.php'; -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_security_redirect_test extends phpbb_security_test_base { @@ -67,7 +66,7 @@ class phpbb_security_redirect_test extends phpbb_security_test_base new \phpbb\symfony_request( new phpbb_mock_request() ), - new \phpbb\filesystem(), + new \phpbb\filesystem\filesystem(), $this->getMock('\phpbb\request\request'), $this->phpbb_root_path, 'php' @@ -110,7 +109,7 @@ class phpbb_security_redirect_test extends phpbb_security_test_base if ($expected_error !== false) { - $this->setExpectedTriggerError(E_USER_ERROR, $user->lang[$expected_error]); + $this->setExpectedTriggerError(E_USER_WARNING, $user->lang[$expected_error]); } $result = redirect($test, true, $disable_cd_check); |