diff options
Diffstat (limited to 'tests/functional/extension_controller_test.php')
-rw-r--r-- | tests/functional/extension_controller_test.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php index 4725301141..bba11291af 100644 --- a/tests/functional/extension_controller_test.php +++ b/tests/functional/extension_controller_test.php @@ -113,11 +113,27 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c } /** + * Check the redirect after using he login_box() form + */ + public function test_login_redirect() + { + $this->phpbb_extension_manager->enable('foo/bar'); + $crawler = self::request('GET', 'app.php/foo/login_redirect'); + $this->assertContainsLang('LOGIN', $crawler->filter('h2')->text()); + $form = $crawler->selectButton('login')->form(array( + 'username' => 'admin', + 'password' => 'adminadmin', + )); + $crawler = self::submit($form); + $this->assertContains("I am a variable", $crawler->filter('#content')->text(), 'Unsuccessful redirect after using login_box()'); + $this->phpbb_extension_manager->purge('foo/bar'); + } + + /** * Check the output of a controller using the template system */ public function test_redirect() { - $filesystem = new \phpbb\filesystem(); $this->phpbb_extension_manager->enable('foo/bar'); $crawler = self::request('GET', 'app.php/foo/redirect'); |