public function YamlFileLoaderTest::testLoadWithPattern

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php, line 82

Class

YamlFileLoaderTest

Namespace

Symfony\Component\Routing\Tests\Loader

Code

public function testLoadWithPattern() {
  $loader = new YamlFileLoader(new FileLocator(array(
    __DIR__ . '/../Fixtures',
  )));
  $routeCollection = $loader
    ->load('validpattern.yml');
  $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'));
}