You are here

public function ResolveDefinitionTemplatesPassTest::testSetLazyOnServiceIsParent 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::testSetLazyOnServiceIsParent()

File

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

Class

ResolveDefinitionTemplatesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testSetLazyOnServiceIsParent() {
  $container = new ContainerBuilder();
  $container
    ->register('parent', 'stdClass')
    ->setLazy(true);
  $container
    ->setDefinition('child1', new DefinitionDecorator('parent'));
  $this
    ->process($container);
  $this
    ->assertTrue($container
    ->getDefinition('child1')
    ->isLazy());
}