diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2021-09-06 09:09:42 +0000 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-09-07 08:49:49 +0000 |
commit | 694d10381bdab1c42f4f2c69a32fcb1c91975ef0 (patch) | |
tree | ffb3b99a71dbc5d2d0b5e064ffcd94dd1208a9b0 | |
parent | b2e4f34e2f7b49b5137462580315b5173c6a6afb (diff) | |
download | nextcloud-server-694d10381bdab1c42f4f2c69a32fcb1c91975ef0.tar.gz nextcloud-server-694d10381bdab1c42f4f2c69a32fcb1c91975ef0.zip |
Adjust tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
-rw-r--r-- | tests/Core/Middleware/TwoFactorMiddlewareTest.php | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php index 5ef2b75fde6..8cc4340ad98 100644 --- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php +++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php @@ -97,10 +97,6 @@ class TwoFactorMiddlewareTest extends TestCase { } public function testBeforeControllerNotLoggedIn() { - $this->reflector->expects($this->once()) - ->method('hasAnnotation') - ->with('PublicPage') - ->willReturn(false); $this->userSession->expects($this->once()) ->method('isLoggedIn') ->willReturn(false); @@ -111,24 +107,9 @@ class TwoFactorMiddlewareTest extends TestCase { $this->middleware->beforeController($this->controller, 'index'); } - public function testBeforeControllerPublicPage() { - $this->reflector->expects($this->once()) - ->method('hasAnnotation') - ->with('PublicPage') - ->willReturn(true); - $this->userSession->expects($this->never()) - ->method('isLoggedIn'); - - $this->middleware->beforeController($this->controller, 'create'); - } - public function testBeforeSetupController() { $user = $this->createMock(IUser::class); $controller = $this->createMock(ALoginSetupController::class); - $this->reflector->expects($this->once()) - ->method('hasAnnotation') - ->with('PublicPage') - ->willReturn(false); $this->userSession->expects($this->any()) ->method('getUser') ->willReturn($user); @@ -144,10 +125,6 @@ class TwoFactorMiddlewareTest extends TestCase { public function testBeforeControllerNoTwoFactorCheckNeeded() { $user = $this->createMock(IUser::class); - $this->reflector->expects($this->once()) - ->method('hasAnnotation') - ->with('PublicPage') - ->willReturn(false); $this->userSession->expects($this->once()) ->method('isLoggedIn') ->willReturn(true); @@ -168,10 +145,6 @@ class TwoFactorMiddlewareTest extends TestCase { $user = $this->createMock(IUser::class); - $this->reflector->expects($this->once()) - ->method('hasAnnotation') - ->with('PublicPage') - ->willReturn(false); $this->userSession->expects($this->once()) ->method('isLoggedIn') ->willReturn(true); |