From 870023365c928e6bc3bd39d0d7f9b4d976dad33e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 24 Jan 2018 18:10:16 +0100 Subject: Fix "Undefined method setExpectedException()" Signed-off-by: Joas Schilling --- tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/lib/AppFramework/Middleware/Security') diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 0d7418673dd..274a2810cba 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -263,7 +263,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $sec = $this->getMiddleware($isLoggedIn, $isAdminUser); if($shouldFail) { - $this->setExpectedException('\OC\AppFramework\Middleware\Security\Exceptions\SecurityException'); + $this->expectException(SecurityException::class); } else { $this->assertTrue(true); } @@ -454,7 +454,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { public function testAfterExceptionNotCaughtThrowsItAgain(){ $ex = new \Exception(); - $this->setExpectedException('\Exception'); + $this->expectException(\Exception::class); $this->middleware->afterException($this->controller, 'test', $ex); } -- cgit v1.2.3