You are here

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

File

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

Class

ResolveDefinitionTemplatesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

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