Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public function test_dynamic_get_route_found(): void |
||
40 | { |
||
41 | $router = Router::withServer([ |
||
42 | 'REQUEST_METHOD' => 'GET', |
||
43 | 'REQUEST_URI' => '/foo/?bar=123000', |
||
44 | ]); |
||
45 | |||
46 | $router->get('/$name', static function (string $name): void { |
||
47 | echo "route '{$name}' found"; |
||
48 | }); |
||
49 | |||
50 | $router->listen(); |
||
51 | |||
52 | $this->expectOutputString("route 'foo' found"); |
||
53 | } |
||
55 |