summaryrefslogtreecommitdiff
path: root/tests/Unit/Middleware/Stub/ExceptionMiddlewareHandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Middleware/Stub/ExceptionMiddlewareHandler.php')
-rw-r--r--tests/Unit/Middleware/Stub/ExceptionMiddlewareHandler.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/Unit/Middleware/Stub/ExceptionMiddlewareHandler.php b/tests/Unit/Middleware/Stub/ExceptionMiddlewareHandler.php
new file mode 100644
index 00000000..5e374bea
--- /dev/null
+++ b/tests/Unit/Middleware/Stub/ExceptionMiddlewareHandler.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Engelsystem\Test\Unit\Middleware\Stub;
+
+use Exception;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Server\RequestHandlerInterface;
+
+class ExceptionMiddlewareHandler implements RequestHandlerInterface
+{
+ /**
+ * Throws an exception
+ *
+ * @param ServerRequestInterface $request
+ * @return ResponseInterface
+ * @throws Exception
+ */
+ public function handle(ServerRequestInterface $request): ResponseInterface
+ {
+ throw new Exception('Boooom!');
+ }
+}