| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 50 | public function testDateRoute(): void |
||
| 51 | { |
||
| 52 | // setup |
||
| 53 | $router = $this->getRouter(); |
||
| 54 | $router->addRoute('/forum-[i:year]-[i:month]-[i:day]', function () { |
||
| 55 | return '1'; |
||
| 56 | }); |
||
| 57 | |||
| 58 | // test body |
||
| 59 | /** @var string $result */ |
||
| 60 | $result = $router->callRoute('/forum-2022-09-13'); |
||
| 61 | |||
| 62 | // assertions |
||
| 63 | $this->assertEquals('1', $result); |
||
| 64 | } |
||
| 66 |