| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php |
||
| 18 | public function test_registerLoader() |
||
| 19 | { |
||
| 20 | $container = new Container(); |
||
| 21 | $container->set('app', new Application()); |
||
| 22 | |||
| 23 | $provider = new RouterServiceProvider(); |
||
| 24 | $provider->setContainer($container); |
||
| 25 | $provider->registerLoader(); |
||
| 26 | |||
| 27 | $loader = $container->get('routing.loader'); |
||
| 28 | self::assertInstanceOf(DelegatingLoader::class, $loader); |
||
| 29 | |||
| 30 | /** @var RouteCollection $collection */ |
||
| 31 | $collection = $loader->load('routes.php'); |
||
| 32 | self::assertInstanceOf(RouteCollection::class, $collection); |
||
| 33 | self::assertCount(8, $collection); |
||
| 34 | self::assertTrue($collection->has('admin.index')); |
||
| 35 | } |
||
| 37 |