diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-04-06 12:08:55 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-04-06 12:08:55 +0200 |
commit | 477f7823e5f51b083c13881d221835ae34c15b8f (patch) | |
tree | 87499bcf46f6b77afe07c5655396b884654a0ada /tests | |
parent | 8523031141ed4037c5099f24e0c527a2bbaf6a75 (diff) | |
download | forums-477f7823e5f51b083c13881d221835ae34c15b8f.tar forums-477f7823e5f51b083c13881d221835ae34c15b8f.tar.gz forums-477f7823e5f51b083c13881d221835ae34c15b8f.tar.bz2 forums-477f7823e5f51b083c13881d221835ae34c15b8f.tar.xz forums-477f7823e5f51b083c13881d221835ae34c15b8f.zip |
[ticket/13522] Fix globals for 3.2 in Q&A tests
PHPBB3-13522
Diffstat (limited to 'tests')
-rw-r--r-- | tests/captcha/qa_test.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/captcha/qa_test.php b/tests/captcha/qa_test.php index 1f2f9f3070..4aa5e714f5 100644 --- a/tests/captcha/qa_test.php +++ b/tests/captcha/qa_test.php @@ -27,14 +27,16 @@ class phpbb_captcha_qa_test extends \phpbb_database_test_case public function setUp() { - global $db; + global $db, $request, $phpbb_container; $db = $this->new_dbal(); parent::setUp(); - $this->request = new \phpbb_mock_request(); - request_var(false, false, false, false, $this->request); + $request = new \phpbb_mock_request(); + $phpbb_container = new \phpbb_mock_container_builder(); + $factory = new \phpbb\db\tools\factory(); + $phpbb_container->set('dbal.tools', $factory->get($db)); $this->qa = new \phpbb\captcha\plugins\qa('phpbb_captcha_questions', 'phpbb_captcha_answers', 'phpbb_qa_confirm'); } @@ -87,7 +89,8 @@ class phpbb_captcha_qa_test extends \phpbb_database_test_case */ public function test_acp_get_question_input($value, $expected) { - $this->request->overwrite('answers', $value); + global $request; + $request->overwrite('answers', $value); $this->assertEquals($expected, $this->qa->acp_get_question_input()); } |