diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2021-09-07 12:47:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 12:47:03 +0200 |
commit | 9ee93ed0bd98b019433c1af535f8aa0e9248465c (patch) | |
tree | 165754c45361939c31ac668f0bcd73f0d57cfcfd /tests | |
parent | 00c2aa5dada374988f3ef08a0064a8ab9115ada2 (diff) | |
parent | 694d10381bdab1c42f4f2c69a32fcb1c91975ef0 (diff) | |
download | nextcloud-server-9ee93ed0bd98b019433c1af535f8aa0e9248465c.tar.gz nextcloud-server-9ee93ed0bd98b019433c1af535f8aa0e9248465c.zip |
Merge pull request #28741 from nextcloud/backport/28725/stable21
[stable21] Remove 2FA exemption from PublicPage annotation
Diffstat (limited to 'tests')
-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); |