public function XmlFileLoaderTest::testLoadWithRoute

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php, line 42

Class

XmlFileLoaderTest

Namespace

Symfony\Component\Routing\Tests\Loader

Code

public function testLoadWithRoute() {
  $loader = new XmlFileLoader(new FileLocator(array(
    __DIR__ . '/../Fixtures',
  )));
  $routeCollection = $loader
    ->load('validpattern.xml');
  $routes = $routeCollection
    ->all();
  $this
    ->assertEquals(1, count($routes), 'One route is loaded');
  $this
    ->assertContainsOnly('Symfony\\Component\\Routing\\Route', $routes);
  $route = $routes['blog_show'];
  $this
    ->assertEquals('RouteCompiler', $route
    ->getOption('compiler_class'));
}