mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/12261] Add a functional test for redirect after using login_box()
PHPBB3-12261
This commit is contained in:
@@ -112,12 +112,28 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
|
||||
$this->assertContains('No route found for "GET /does/not/exist"', $crawler->filter('body')->text());
|
||||
}
|
||||
|
||||
/**
|
||||
* 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');
|
||||
|
||||
|
Reference in New Issue
Block a user