Skip to content

Commit

Permalink
[Security][Tests] Update functional tests to better reflect end-user …
Browse files Browse the repository at this point in the history
…scenarios
  • Loading branch information
llupa authored and chalasr committed Mar 1, 2024
1 parent ce85db1 commit 6773ef1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/Functional/AuthenticatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ public function testCustomFailureHandler()

$client->request('POST', '/firewall1/login', [
'_username' => 'jane@example.org',
'_password' => '',
'_password' => 'wrong',
]);
$this->assertResponseRedirects('http://localhost/firewall1/login');

$client->request('POST', '/firewall1/dummy_login', [
'_username' => 'jane@example.org',
'_password' => '',
'_password' => 'wrong',
]);
$this->assertResponseRedirects('http://localhost/firewall1/dummy_login');
}
Expand Down
2 changes: 2 additions & 0 deletions Tests/Functional/CsrfFormLoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public function testFormLoginWithInvalidCsrfToken($options)
});

$form = $client->request('GET', '/login')->selectButton('login')->form();
$form['user_login[username]'] = 'johannes';
$form['user_login[password]'] = 'test';
$form['user_login[_token]'] = '';
$client->submit($form);

Expand Down

0 comments on commit 6773ef1

Please sign in to comment.