[ticket/233] Properly redirect to portal after login
We need to provide a proper path with controller helper and path helper. A simple path to the portal is not enough, as we redirect from ucp.php. Therefore, we need to remove the web root path from the URL to the portal. B3P-233
This commit is contained in:
@@ -38,4 +38,22 @@ class phpbb_functional_portal_redirect_test extends \board3\portal\tests\testfra
|
||||
$this->assertContains('Board3 Portal', $crawler->text());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_redirect_after_login()
|
||||
{
|
||||
// Make sure we are logged out
|
||||
$this->logout();
|
||||
|
||||
$crawler = self::request('GET', 'app.php/portal?sid=' . $this->sid);
|
||||
$form = $crawler->selectButton('Login')->form();
|
||||
$form->setValues(array(
|
||||
'username' => 'admin',
|
||||
'password' => 'adminadmin',
|
||||
));
|
||||
|
||||
$crawler = self::submit($form);
|
||||
|
||||
// Should be redirected to portal and logged in
|
||||
$this->assertContains('Site Admin', $crawler->text());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user