Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/Controller/LoginController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types=1);

/**
* @copyright Copyright (c) 2017, Sandro Lutz <[email protected]>
* @copyright Copyright (c) 2016 Joas Schilling <[email protected]>
Expand Down Expand Up @@ -227,7 +230,7 @@ private function setPasswordResetInitialState(?string $username): void {
$user = null;
}

$passwordLink = $this->config->getSystemValue('lost_password_link', '');
$passwordLink = $this->config->getSystemValueString('lost_password_link', '');

$this->initialStateService->provideInitialState(
'core',
Expand Down
21 changes: 17 additions & 4 deletions tests/Core/Controller/LoginControllerTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types=1);

/**
* @author Lukas Reschke <[email protected]>
*
Expand Down Expand Up @@ -337,11 +340,16 @@ public function testShowLoginFormWithPasswordResetOption($canChangePassword,
->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
Expand Down Expand Up @@ -386,11 +394,16 @@ public function testShowLoginFormForUserNamed0() {
->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())
Expand Down