aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/extension_controller_test.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2014-03-12 18:48:41 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2014-03-12 18:48:41 -0500
commitd69012ea6d65e938a72f7accca498fc9feb2df0d (patch)
treef18aa896ab7be6889f3860edc157cd8a3146cc6a /tests/functional/extension_controller_test.php
parentc6a87e77d4e11bd9e2e47e20c96fee66892c04b0 (diff)
parente07f3141179da9943ed51e754f15912dd24f4aff (diff)
downloadforums-d69012ea6d65e938a72f7accca498fc9feb2df0d.tar
forums-d69012ea6d65e938a72f7accca498fc9feb2df0d.tar.gz
forums-d69012ea6d65e938a72f7accca498fc9feb2df0d.tar.bz2
forums-d69012ea6d65e938a72f7accca498fc9feb2df0d.tar.xz
forums-d69012ea6d65e938a72f7accca498fc9feb2df0d.zip
Merge pull request #2104 from nickvergessen/ticket/12261
[ticket/12261] Remove web root path from login redirect url
Diffstat (limited to 'tests/functional/extension_controller_test.php')
-rw-r--r--tests/functional/extension_controller_test.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
index 4725301141..57b0f56bee 100644
--- a/tests/functional/extension_controller_test.php
+++ b/tests/functional/extension_controller_test.php
@@ -113,11 +113,32 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
}
/**
+ * Check the redirect after using the login_box() form
+ */
+ public function test_login_redirect()
+ {
+ $this->markTestIncomplete('Session table contains incorrect data for controllers on travis,'
+ . 'therefor the redirect fails.');
+
+ $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',
+ ));
+ $this->assertStringStartsWith('./app.php/foo/login_redirect', $form->get('redirect')->getValue());
+
+ $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');