mirror of
https://github.com/nextcloud/server.git
synced 2026-03-21 18:11:02 -04:00
chore: Make the LoginController strict
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
0d6a706bc0
commit
138deec333
2 changed files with 21 additions and 5 deletions
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2017, Sandro Lutz <sandro.lutz@temparus.ch>
|
||||
* @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
|
||||
|
|
@ -227,7 +230,7 @@ class LoginController extends Controller {
|
|||
$user = null;
|
||||
}
|
||||
|
||||
$passwordLink = $this->config->getSystemValue('lost_password_link', '');
|
||||
$passwordLink = $this->config->getSystemValueString('lost_password_link', '');
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'core',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @author Lukas Reschke <lukas@owncloud.com>
|
||||
*
|
||||
|
|
@ -337,11 +340,16 @@ class LoginControllerTest extends TestCase {
|
|||
->method('isLoggedIn')
|
||||
->willReturn(false);
|
||||
$this->config
|
||||
->expects($this->exactly(2))
|
||||
->expects(self::once())
|
||||
->method('getSystemValue')
|
||||
->willReturnMap([
|
||||
['login_form_autocomplete', true, true],
|
||||
['lost_password_link', '', false],
|
||||
]);
|
||||
$this->config
|
||||
->expects(self::once())
|
||||
->method('getSystemValueString')
|
||||
->willReturnMap([
|
||||
['lost_password_link', '', ''],
|
||||
]);
|
||||
$user = $this->createMock(IUser::class);
|
||||
$user
|
||||
|
|
@ -386,11 +394,16 @@ class LoginControllerTest extends TestCase {
|
|||
->method('isLoggedIn')
|
||||
->willReturn(false);
|
||||
$this->config
|
||||
->expects($this->exactly(2))
|
||||
->expects(self::once())
|
||||
->method('getSystemValue')
|
||||
->willReturnMap([
|
||||
['login_form_autocomplete', true, true],
|
||||
['lost_password_link', '', false],
|
||||
]);
|
||||
$this->config
|
||||
->expects(self::once())
|
||||
->method('getSystemValueString')
|
||||
->willReturnMap([
|
||||
['lost_password_link', '', ''],
|
||||
]);
|
||||
$user = $this->createMock(IUser::class);
|
||||
$user->expects($this->once())
|
||||
|
|
|
|||
Loading…
Reference in a new issue