Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class RouterTest extends TestCase |
||
11 | { |
||
12 | public function test_404_no_route_found(): void |
||
22 | } |
||
23 | |||
24 | public function test_static_get_route_found(): void |
||
25 | { |
||
26 | $router = Router::withServer([ |
||
27 | 'REQUEST_METHOD' => 'GET', |
||
28 | 'REQUEST_URI' => '/foo/?bar=123000', |
||
29 | ]); |
||
30 | $router->get('/foo', static function (): void { |
||
31 | echo 'route found'; |
||
32 | }); |
||
33 | |||
34 | $router->listen(); |
||
35 | |||
36 | $this->expectOutputString('route found'); |
||
37 | } |
||
38 | |||
39 | public function test_dynamic_get_route_found(): void |
||
53 | } |
||
54 | } |
||
55 |