You are here

public function PhpFileLoaderTest::testThatDefiningVariableInConfigFileHasNoSideEffects in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/routing/Tests/Loader/PhpFileLoaderTest.php \Symfony\Component\Routing\Tests\Loader\PhpFileLoaderTest::testThatDefiningVariableInConfigFileHasNoSideEffects()

File

vendor/symfony/routing/Tests/Loader/PhpFileLoaderTest.php, line 68

Class

PhpFileLoaderTest

Namespace

Symfony\Component\Routing\Tests\Loader

Code

public function testThatDefiningVariableInConfigFileHasNoSideEffects() {
  $locator = new FileLocator(array(
    __DIR__ . '/../Fixtures',
  ));
  $loader = new PhpFileLoader($locator);
  $routeCollection = $loader
    ->load('with_define_path_variable.php');
  $resources = $routeCollection
    ->getResources();
  $this
    ->assertCount(1, $resources);
  $this
    ->assertContainsOnly('Symfony\\Component\\Config\\Resource\\ResourceInterface', $resources);
  $fileResource = reset($resources);
  $this
    ->assertSame(realpath($locator
    ->locate('with_define_path_variable.php')), (string) $fileResource);
}