From 2ee5c7a8f96f3a51c470409126bc6484f2dad38a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 9 Jan 2024 15:58:02 +0100 Subject: [PATCH] fix(tests): Fix remaining tests Signed-off-by: Joas Schilling --- tests/Core/Controller/LoginControllerTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index 88bff12e233..c17f307d4c7 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -148,7 +148,7 @@ class LoginControllerTest extends TestCase { $this->request ->expects($this->once()) ->method('isUserAgent') - ->willReturn(true); + ->willReturn(false); $this->config ->expects($this->never()) ->method('deleteUserValue'); @@ -169,6 +169,9 @@ class LoginControllerTest extends TestCase { ->method('getCookie') ->with('nc_token') ->willReturn(null); + $this->request + ->method('getServerProtocol') + ->willReturn('https'); $this->request ->expects($this->once()) ->method('isUserAgent') @@ -189,6 +192,9 @@ class LoginControllerTest extends TestCase { ->method('getCookie') ->with('nc_token') ->willReturn('MyLoginToken'); + $this->request + ->method('getServerProtocol') + ->willReturn('https'); $this->request ->expects($this->once()) ->method('isUserAgent') -- 2.39.5