Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2021-09-06 12:09:42 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-09-07 11:47:17 +0300
commitd720b987da542cd11160a613836dd106680fb050 (patch)
tree9d84d8b52e0edfde9ee85ff925b1ec2f70361efe /tests
parent2e1f7a81615babbd7098c533ac0229c054b3e36b (diff)
Adjust tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Middleware/TwoFactorMiddlewareTest.php27
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);