aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/extension_controller_test.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-10 10:48:19 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-03-10 12:35:30 +0100
commite8fdc1545a54e87541efa404265abbd16dc31ead (patch)
tree2b87993674e5c5a116a82e1c1241008da4fc145d /tests/functional/extension_controller_test.php
parentb876c073776a5b11c08e5f71bf12bc06fd5195d8 (diff)
downloadforums-e8fdc1545a54e87541efa404265abbd16dc31ead.tar
forums-e8fdc1545a54e87541efa404265abbd16dc31ead.tar.gz
forums-e8fdc1545a54e87541efa404265abbd16dc31ead.tar.bz2
forums-e8fdc1545a54e87541efa404265abbd16dc31ead.tar.xz
forums-e8fdc1545a54e87541efa404265abbd16dc31ead.zip
[ticket/12261] Add a functional test for redirect after using login_box()
PHPBB3-12261
Diffstat (limited to 'tests/functional/extension_controller_test.php')
-rw-r--r--tests/functional/extension_controller_test.php18
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');