public function YamlFileLoaderTest::testLoadYamlOnlyWithKeys in Service Container 7.2
Same name and namespace in other branches
- 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
Namespace
Symfony\Component\DependencyInjection\Tests\LoaderCode
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());
}