Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function testGetRoute() |
||
16 | { |
||
17 | $router = new Router(); |
||
18 | $router->initRouteCollection(); |
||
19 | |||
20 | foreach (['index', 'blog'] as $slug) { |
||
21 | $route = new Route(); |
||
22 | $route->setName($slug); |
||
23 | $router->addRoute($route); |
||
24 | } |
||
25 | |||
26 | self::assertInstanceOf(Route::class, $router->getRoute('index')); |
||
27 | } |
||
29 |