diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-07-26 09:03:04 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-07-31 16:54:19 +0200 |
commit | 3548603a88360f9577a386c3b9c2032230c48632 (patch) | |
tree | 04de57fb989fabc9216d918526b6d5b07176188d /tests/lib/AppFramework | |
parent | 72eb610b3d0c73e7dd79286c0719152688a5f915 (diff) | |
download | nextcloud-server-3548603a88360f9577a386c3b9c2032230c48632.tar.gz nextcloud-server-3548603a88360f9577a386c3b9c2032230c48632.zip |
Fix middleware implementations signatures
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/AppFramework')
-rw-r--r-- | tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php index 2b7a79bae2f..9eca127cb89 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php @@ -26,6 +26,7 @@ namespace Test\AppFramework\Middleware; use OC\AppFramework\Http\Request; use OC\AppFramework\Middleware\MiddlewareDispatcher; +use OCP\AppFramework\Controller; use OCP\AppFramework\Middleware; use OCP\AppFramework\Http\Response; @@ -61,7 +62,7 @@ class TestMiddleware extends Middleware { $this->beforeControllerThrowsEx = $beforeControllerThrowsEx; } - public function beforeController($controller, $methodName){ + public function beforeController(Controller $controller, $methodName){ self::$beforeControllerCalled++; $this->beforeControllerOrder = self::$beforeControllerCalled; $this->controller = $controller; @@ -71,7 +72,7 @@ class TestMiddleware extends Middleware { } } - public function afterException($controller, $methodName, \Exception $exception){ + public function afterException(Controller $controller, $methodName, \Exception $exception){ self::$afterExceptionCalled++; $this->afterExceptionOrder = self::$afterExceptionCalled; $this->controller = $controller; @@ -80,7 +81,7 @@ class TestMiddleware extends Middleware { parent::afterException($controller, $methodName, $exception); } - public function afterController($controller, $methodName, Response $response){ + public function afterController(Controller $controller, $methodName, Response $response){ self::$afterControllerCalled++; $this->afterControllerOrder = self::$afterControllerCalled; $this->controller = $controller; @@ -89,7 +90,7 @@ class TestMiddleware extends Middleware { return parent::afterController($controller, $methodName, $response); } - public function beforeOutput($controller, $methodName, $output){ + public function beforeOutput(Controller $controller, $methodName, $output){ self::$beforeOutputCalled++; $this->beforeOutputOrder = self::$beforeOutputCalled; $this->controller = $controller; |