public function ResolveDefinitionTemplatesPassTest::testProcessHandlesMultipleInheritance in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\ResolveDefinitionTemplatesPassTest::testProcessHandlesMultipleInheritance()
File
- vendor/
symfony/ dependency-injection/ Tests/ Compiler/ ResolveDefinitionTemplatesPassTest.php, line 139
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
public function testProcessHandlesMultipleInheritance() {
$container = new ContainerBuilder();
$container
->register('parent', 'foo')
->setArguments(array(
'foo',
'bar',
'c',
));
$container
->setDefinition('child2', new DefinitionDecorator('child1'))
->replaceArgument(1, 'b');
$container
->setDefinition('child1', new DefinitionDecorator('parent'))
->replaceArgument(0, 'a');
$this
->process($container);
$def = $container
->getDefinition('child2');
$this
->assertEquals(array(
'a',
'b',
'c',
), $def
->getArguments());
$this
->assertEquals('foo', $def
->getClass());
}