Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function testLogger() |
||
17 | { |
||
18 | $that = $this; |
||
19 | |||
20 | // TODO Use PSR3 logger |
||
21 | $logger = new CallbackLogger(function ($level, $message, array $context) use ($that) { |
||
|
|||
22 | $that->assertRegExp('~^Sent "GET http://google.com/" in \d+ms$~', $message); |
||
23 | }); |
||
24 | |||
25 | $request = new Request('GET', 'http://google.com/'); |
||
26 | $response = new Response(); |
||
27 | |||
28 | $middleware = new LoggerMiddleware($logger); |
||
29 | $middleware->handleRequest($request, function () {}); |
||
30 | $middleware->handleResponse($request, $response, function () {}); |
||
31 | } |
||
54 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.