diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 4ec6d5c38c449..4c4a12355d22f 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -1,4 +1,7 @@ * @copyright Copyright (c) 2016 Joas Schilling @@ -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', diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index b80fde008d557..fae20ae6b741b 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -1,4 +1,7 @@ * @@ -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 @@ -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())