diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index ae033582d3c41..6044440bdaf0e 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -143,9 +143,8 @@ public function testLogoutWithoutToken() { ->with('nc_token') ->willReturn(null); $this->request - ->expects($this->once()) - ->method('isUserAgent') - ->willReturn(false); + ->method('getServerProtocol') + ->willReturn('https'); $this->config ->expects($this->never()) ->method('deleteUserValue'); @@ -160,26 +159,6 @@ public function testLogoutWithoutToken() { $this->assertEquals($expected, $this->loginController->logout()); } - public function testLogoutNoClearSiteData() { - $this->request - ->expects($this->once()) - ->method('getCookie') - ->with('nc_token') - ->willReturn(null); - $this->request - ->expects($this->once()) - ->method('isUserAgent') - ->willReturn(true); - $this->urlGenerator - ->expects($this->once()) - ->method('linkToRouteAbsolute') - ->with('core.login.showLoginForm') - ->willReturn('/login'); - - $expected = new RedirectResponse('/login'); - $this->assertEquals($expected, $this->loginController->logout()); - } - public function testLogoutWithToken() { $this->request ->expects($this->once()) @@ -188,8 +167,8 @@ public function testLogoutWithToken() { ->willReturn('MyLoginToken'); $this->request ->expects($this->once()) - ->method('isUserAgent') - ->willReturn(false); + ->method('getServerProtocol') + ->willReturn('https'); $user = $this->createMock(IUser::class); $user ->expects($this->once())