Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testKernelWrapper() |
||
14 | { |
||
15 | $stream = fopen('php://temp', 'r'); |
||
16 | $request = new Request(['REQUEST_URI' => '/hello'], $stream); |
||
17 | |||
18 | $symfonyResponse = new HttpFoundationResponse('Hello World'); |
||
19 | |||
20 | $kernel = new MockKernel(function (HttpFoundationRequest $symfonyRequest) use ($symfonyResponse) { |
||
21 | $this->assertEquals('/hello', $symfonyRequest->getRequestUri()); |
||
22 | |||
23 | return $symfonyResponse; |
||
24 | }); |
||
25 | |||
26 | $kernelWrapper = new KernelWrapper($kernel); |
||
27 | |||
28 | $this->assertEquals($symfonyResponse, $kernelWrapper->handleRequest($request)); |
||
29 | |||
30 | fclose($stream); |
||
31 | } |
||
32 | } |
||
33 |