You are here

public function YamlFileLoaderTest::testLoadYamlOnlyWithKeys 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::testLoadYamlOnlyWithKeys()

File

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

Class

YamlFileLoaderTest

Namespace

Symfony\Component\DependencyInjection\Tests\Loader

Code

public function testLoadYamlOnlyWithKeys() {
  $container = new ContainerBuilder();
  $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
  $loader
    ->load('services21.yml');
  $definition = $container
    ->getDefinition('manager');
  $this
    ->assertEquals(array(
    array(
      'setLogger',
      array(
        new Reference('logger'),
      ),
    ),
    array(
      'setClass',
      array(
        'User',
      ),
    ),
  ), $definition
    ->getMethodCalls());
  $this
    ->assertEquals(array(
    true,
  ), $definition
    ->getArguments());
  $this
    ->assertEquals(array(
    'manager' => array(
      array(
        'alias' => 'user',
      ),
    ),
  ), $definition
    ->getTags());
}