Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
54 | public function testGetCallbackWithUnexistingRoute(): void |
||
55 | { |
||
56 | // setup |
||
57 | $router = new Router(); |
||
58 | $router->addRoute('existing-route', function () { |
||
59 | return 'existing route result'; |
||
60 | }); |
||
61 | |||
62 | // assertions |
||
63 | $this->expectException(\Exception::class); |
||
64 | |||
65 | // test body |
||
66 | $router->getCallback('unexisting-route'); |
||
67 | } |
||
69 |