public function YamlFileLoaderTest::testLoadParameters

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php, line 82

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',
    'foo_bar' => new Reference('foo_bar'),
  ), $container
    ->getParameterBag()
    ->all(), '->load() converts YAML keys to lowercase');
}