Skip to content
Snippets Groups Projects
Commit 82c2c10b authored by Rayn0r's avatar Rayn0r
Browse files

adapted automated test for autocomplete changes


Signed-off-by: default avatarRayn0r <Andre.Weidemann@web.de>
parent 85eb43ba
No related branches found
No related tags found
No related merge requests found
...@@ -199,6 +199,7 @@ class LoginControllerTest extends TestCase { ...@@ -199,6 +199,7 @@ class LoginControllerTest extends TestCase {
'alt_login' => [], 'alt_login' => [],
'resetPasswordLink' => null, 'resetPasswordLink' => null,
'throttle_delay' => 1000, 'throttle_delay' => 1000,
'login_form_autocomplete' => 'off',
], ],
'guest' 'guest'
); );
...@@ -223,6 +224,7 @@ class LoginControllerTest extends TestCase { ...@@ -223,6 +224,7 @@ class LoginControllerTest extends TestCase {
'alt_login' => [], 'alt_login' => [],
'resetPasswordLink' => null, 'resetPasswordLink' => null,
'throttle_delay' => 1000, 'throttle_delay' => 1000,
'login_form_autocomplete' => 'off',
], ],
'guest' 'guest'
); );
...@@ -255,10 +257,12 @@ class LoginControllerTest extends TestCase { ...@@ -255,10 +257,12 @@ class LoginControllerTest extends TestCase {
->method('isLoggedIn') ->method('isLoggedIn')
->willReturn(false); ->willReturn(false);
$this->config $this->config
->expects($this->once()) ->expects($this->exactly(2))
->method('getSystemValue') ->method('getSystemValue')
->with('lost_password_link') ->will($this->returnValueMap([
->willReturn(false); ['login_form_autocomplete', true, true],
['lost_password_link', '', false],
]));
$user = $this->createMock(IUser::class); $user = $this->createMock(IUser::class);
$user $user
->expects($this->once()) ->expects($this->once())
...@@ -281,6 +285,7 @@ class LoginControllerTest extends TestCase { ...@@ -281,6 +285,7 @@ class LoginControllerTest extends TestCase {
'alt_login' => [], 'alt_login' => [],
'resetPasswordLink' => false, 'resetPasswordLink' => false,
'throttle_delay' => 1000, 'throttle_delay' => 1000,
'login_form_autocomplete' => 'on',
], ],
'guest' 'guest'
); );
...@@ -338,10 +343,12 @@ class LoginControllerTest extends TestCase { ...@@ -338,10 +343,12 @@ class LoginControllerTest extends TestCase {
->method('isLoggedIn') ->method('isLoggedIn')
->willReturn(false); ->willReturn(false);
$this->config $this->config
->expects($this->once()) ->expects($this->exactly(2))
->method('getSystemValue') ->method('getSystemValue')
->with('lost_password_link') ->will($this->returnValueMap([
->willReturn(false); ['login_form_autocomplete', true, true],
['lost_password_link', '', false],
]));
$user = $this->createMock(IUser::class); $user = $this->createMock(IUser::class);
$user->expects($this->once()) $user->expects($this->once())
->method('canChangePassword') ->method('canChangePassword')
...@@ -363,6 +370,7 @@ class LoginControllerTest extends TestCase { ...@@ -363,6 +370,7 @@ class LoginControllerTest extends TestCase {
'alt_login' => [], 'alt_login' => [],
'resetPasswordLink' => false, 'resetPasswordLink' => false,
'throttle_delay' => 1000, 'throttle_delay' => 1000,
'login_form_autocomplete' => 'on',
], ],
'guest' 'guest'
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment