You are here

public function ResolveDefinitionTemplatesPassTest::testSetDecoratedServiceOnServiceHasParent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\ResolveDefinitionTemplatesPassTest::testSetDecoratedServiceOnServiceHasParent()

File

vendor/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php, line 195

Class

ResolveDefinitionTemplatesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testSetDecoratedServiceOnServiceHasParent() {
  $container = new ContainerBuilder();
  $container
    ->register('parent', 'stdClass');
  $container
    ->setDefinition('child1', new DefinitionDecorator('parent'))
    ->setDecoratedService('foo', 'foo_inner');
  $this
    ->process($container);
  $this
    ->assertEquals(array(
    'foo',
    'foo_inner',
  ), $container
    ->getDefinition('child1')
    ->getDecoratedService());
}