diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-10 16:25:58 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-10 16:25:58 +0200 |
commit | 685f27221289a2b33918048b62427a44573511bb (patch) | |
tree | 4185c28e622a3992222e60a9e0b68c00156d14da /apps/files_sharing/lib/Middleware | |
parent | c9d2e31d527190660c51a75741747178f029091c (diff) | |
download | nextcloud-server-685f27221289a2b33918048b62427a44573511bb.tar.gz nextcloud-server-685f27221289a2b33918048b62427a44573511bb.zip |
Add unit tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib/Middleware')
-rw-r--r-- | apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php b/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php index a069ecacc2a..56e9b48f570 100644 --- a/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php +++ b/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php @@ -25,7 +25,7 @@ class ShareInfoMiddleware extends Middleware { * @param string $methodName * @throws S2SException */ - public function beforeController(Controller $controller, $methodName) { + public function beforeController($controller, $methodName) { if (!($controller instanceof ShareInfoController)) { return; } @@ -42,7 +42,7 @@ class ShareInfoMiddleware extends Middleware { * @throws \Exception * @return Response */ - public function afterException(Controller $controller, $methodName, \Exception $exception) { + public function afterException($controller, $methodName, \Exception $exception) { if (!($controller instanceof ShareInfoController)) { throw $exception; } @@ -50,6 +50,8 @@ class ShareInfoMiddleware extends Middleware { if ($exception instanceof S2SException) { return new JSONResponse([], Http::STATUS_NOT_FOUND); } + + throw $exception; } /** @@ -58,7 +60,7 @@ class ShareInfoMiddleware extends Middleware { * @param Response $response * @return Response */ - public function afterController(Controller $controller, $methodName, Response $response) { + public function afterController($controller, $methodName, Response $response) { if (!($controller instanceof ShareInfoController)) { return $response; } |