summaryrefslogtreecommitdiffstats
path: root/tests/Core/Middleware/TwoFactorMiddlewareTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Middleware/TwoFactorMiddlewareTest.php')
-rw-r--r--tests/Core/Middleware/TwoFactorMiddlewareTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php
index 65db9733ab2..2198cc7d5b4 100644
--- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php
+++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php
@@ -162,10 +162,10 @@ class TwoFactorMiddlewareTest extends TestCase {
$this->middleware->beforeController($this->controller, 'index');
}
- /**
- * @expectedException \OC\Authentication\Exceptions\TwoFactorAuthRequiredException
- */
+
public function testBeforeControllerTwoFactorAuthRequired() {
+ $this->expectException(\OC\Authentication\Exceptions\TwoFactorAuthRequiredException::class);
+
$user = $this->createMock(IUser::class);
$this->reflector->expects($this->once())
@@ -190,10 +190,10 @@ class TwoFactorMiddlewareTest extends TestCase {
$this->middleware->beforeController($this->controller, 'index');
}
- /**
- * @expectedException \OC\Authentication\Exceptions\UserAlreadyLoggedInException
- */
+
public function testBeforeControllerUserAlreadyLoggedIn() {
+ $this->expectException(\OC\Authentication\Exceptions\UserAlreadyLoggedInException::class);
+
$user = $this->createMock(IUser::class);
$this->reflector