| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 15 | public function testUnexistingRouteException(): void |
||
| 16 | { |
||
| 17 | // setup |
||
| 18 | $router = $this->getRouter(); |
||
| 19 | $router->addGetRoute('r1', $this, 'r1'); |
||
| 20 | $router->addPostRoute('r1', $this, 'r1'); |
||
| 21 | |||
| 22 | // assertions |
||
| 23 | $this->expectException(\Exception::class); |
||
| 24 | $this->expectExceptionCode(- 1); |
||
| 25 | $this->expectErrorMessage('The processor was not found for the route unexisting in GET : r1, ; POST : r1, ; PUT : <none>; DELETE : <none>; OPTION : <none>; PATCH : <none>'); |
||
| 26 | |||
| 27 | // test body |
||
| 28 | $router->callRoute('unexisting'); |
||
| 29 | } |
||
| 31 |