summaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Middleware/Security
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-01-24 18:10:16 +0100
committerJoas Schilling <coding@schilljs.com>2018-01-24 18:10:16 +0100
commit870023365c928e6bc3bd39d0d7f9b4d976dad33e (patch)
tree74c1438392d2101c154a80d4f4b9d4777c77bd1a /tests/lib/AppFramework/Middleware/Security
parentc3424df1f026854ed8adbfdf8d96da7a6562a8dd (diff)
downloadnextcloud-server-870023365c928e6bc3bd39d0d7f9b4d976dad33e.tar.gz
nextcloud-server-870023365c928e6bc3bd39d0d7f9b4d976dad33e.zip
Fix "Undefined method setExpectedException()"
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/AppFramework/Middleware/Security')
-rw-r--r--tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php4
1 files changed, 2 insertions, 2 deletions
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);
}