public function YamlFileLoaderTest::testLoadDoesNothingIfEmpty

File

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

Class

YamlFileLoaderTest

Namespace

Symfony\Component\Routing\Tests\Loader

Code

public function testLoadDoesNothingIfEmpty() {
  $loader = new YamlFileLoader(new FileLocator(array(
    __DIR__ . '/../Fixtures',
  )));
  $collection = $loader
    ->load('empty.yml');
  $this
    ->assertEquals(array(), $collection
    ->all());
  $this
    ->assertEquals(array(
    new FileResource(realpath(__DIR__ . '/../Fixtures/empty.yml')),
  ), $collection
    ->getResources());
}