You are here

public function YamlFileLoaderTest::testLoadParameters in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\YamlFileLoaderTest::testLoadParameters()

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php, line 94

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