You are here

public function YamlFileLoaderTest::testLoadDoesNothingIfEmpty in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/routing/Tests/Loader/YamlFileLoaderTest.php \Symfony\Component\Routing\Tests\Loader\YamlFileLoaderTest::testLoadDoesNothingIfEmpty()
  2. 8 vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php \Symfony\Component\Translation\Tests\Loader\YamlFileLoaderTest::testLoadDoesNothingIfEmpty()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Tests/Loader/YamlFileLoaderTest.php \Symfony\Component\Routing\Tests\Loader\YamlFileLoaderTest::testLoadDoesNothingIfEmpty()

File

vendor/symfony/routing/Tests/Loader/YamlFileLoaderTest.php, line 33

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());
}