post_only: true
- always_use_default_target_path: true
+ always_use_default_target_path: false
default_target_path: /
- target_path_parameter: redirect_url
+ target_path_parameter: _target_path
use_referer: true
failure_path: null
$this->assertContains('Bad credentials', $client->getResponse()->getContent());
}
+ public function testRedirectionAfterLogin()
+ {
+ $client = $this->getClient();
+ $client->followRedirects();
+
+ $crawler = $client->request('GET', '/config');
+
+ $form = $crawler->filter('button[type=submit]')->form();
+
+ $data = array(
+ '_username' => 'admin',
+ '_password' => 'mypassword',
+ );
+
+ $client->submit($form, $data);
+
+ $this->assertContains('RSS', $client->getResponse()->getContent());
+ }
+
public function testForgotPassword()
{
$client = $this->getClient();