diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2021-09-06 09:09:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-06 09:09:42 +0000 |
commit | 8da6a9bea9d4965ab6617b362ba9195f1c3fd5d4 (patch) | |
tree | f892fc0765474650abf7f7501f7451aa9e39d19f /tests/Core | |
parent | 7c1038bfb390c150f08937f62ff9a5c43bf9ebde (diff) | |
download | nextcloud-server-8da6a9bea9d4965ab6617b362ba9195f1c3fd5d4.tar.gz nextcloud-server-8da6a9bea9d4965ab6617b362ba9195f1c3fd5d4.zip |
Adjust tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'tests/Core')
-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); |