Skip to content

Commit 4155f66

Browse files
llupachalasr
authored andcommitted
[Security][Tests] Update functional tests to better reflect end-user scenarios
1 parent ac07f3e commit 4155f66

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ public function testCustomFailureHandler()
126126

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

133133
$client->request('POST', '/firewall1/dummy_login', [
134134
'_username' => 'jane@example.org',
135-
'_password' => '',
135+
'_password' => 'wrong',
136136
]);
137137
$this->assertResponseRedirects('http://localhost/firewall1/dummy_login');
138138
}

src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public function testFormLoginWithInvalidCsrfToken($options)
6868
});
6969

7070
$form = $client->request('GET', '/login')->selectButton('login')->form();
71+
$form['user_login[username]'] = 'johannes';
72+
$form['user_login[password]'] = 'test';
7173
$form['user_login[_token]'] = '';
7274
$client->submit($form);
7375

0 commit comments

Comments
 (0)