You are here

public function YamlFileLoaderTest::testLoadParameters in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/Loader/YamlFileLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\YamlFileLoaderTest::testLoadParameters()

File

vendor/symfony/dependency-injection/Tests/Loader/YamlFileLoaderTest.php, line 95

Class

YamlFileLoaderTest

Namespace

Symfony\Component\DependencyInjection\Tests\Loader

Code

public function testLoadParameters() {
  $container = new ContainerBuilder();
  $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
  $loader
    ->load('services2.yml');
  $this
    ->assertEquals(array(
    'foo' => 'bar',
    'mixedcase' => array(
      'MixedCaseKey' => 'value',
    ),
    'values' => array(
      true,
      false,
      0,
      1000.3,
    ),
    'bar' => 'foo',
    'escape' => '@escapeme',
    'foo_bar' => new Reference('foo_bar'),
  ), $container
    ->getParameterBag()
    ->all(), '->load() converts YAML keys to lowercase');
}