summaryrefslogtreecommitdiff
path: root/tests/Unit/Middleware/Stub/ExceptionMiddlewareHandler.php
blob: 5e374bea6e6f5aecde2520df2691052ef64fe3ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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!');
    }
}