diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
commit | 3a7cf40aaa678bea1df143d2982d603b7a334eec (patch) | |
tree | 63c1e3ad7f7f401d14411a4d44c523632906afc9 /tests/Core/Middleware | |
parent | 0568b012672d650c6b5a49e72c4028dde5463c60 (diff) | |
download | nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.tar.gz nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.zip |
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/Core/Middleware')
-rw-r--r-- | tests/Core/Middleware/TwoFactorMiddlewareTest.php | 12 |
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 |