public function testLoadWithImport() {
$loader = new XmlFileLoader(new FileLocator(array(
__DIR__ . '/../Fixtures',
)));
$routeCollection = $loader
->load('validresource.xml');
$routes = $routeCollection
->all();
$this
->assertCount(2, $routes, 'Two routes are loaded');
$this
->assertContainsOnly('Symfony\\Component\\Routing\\Route', $routes);
foreach ($routes as $route) {
$this
->assertSame('/{foo}/blog/{slug}', $route
->getPath());
$this
->assertSame('123', $route
->getDefault('foo'));
$this
->assertSame('\\d+', $route
->getRequirement('foo'));
$this
->assertSame('bar', $route
->getOption('foo'));
$this
->assertSame('', $route
->getHost());
}
}