Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function testProcess() |
||
15 | { |
||
16 | // Symfony middleware that returns 'foo' |
||
17 | $symfonyMiddleware = new class implements HttpKernelInterface |
||
18 | { |
||
19 | public function handle(SymfonyRequest $request, $type = self::MASTER_REQUEST, $catch = true) |
||
20 | { |
||
21 | return new SymfonyResponse('foo'); |
||
22 | } |
||
23 | }; |
||
24 | |||
25 | $delegate = $this->createMock(RequestHandlerInterface::class); |
||
26 | |||
27 | $bridge = new Psr15ToSymfonyBridge($symfonyMiddleware); |
||
28 | |||
29 | $request = new ServerRequest([], [], new Uri('/'), 'GET'); |
||
30 | $response = $bridge->process($request, $delegate); |
||
31 | |||
32 | $this->assertEquals('foo', (string) $response->getBody()); |
||
33 | } |
||
34 | } |
||
35 |