You are here

public function ResolveDefinitionTemplatesPassTest::testProcessDoesNotCopyScope in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\ResolveDefinitionTemplatesPassTest::testProcessDoesNotCopyScope()

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php, line 82

Class

ResolveDefinitionTemplatesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcessDoesNotCopyScope() {
  $container = new ContainerBuilder();
  $container
    ->register('parent')
    ->setScope('foo');
  $container
    ->setDefinition('child', new DefinitionDecorator('parent'));
  $this
    ->process($container);
  $def = $container
    ->getDefinition('child');
  $this
    ->assertEquals(ContainerInterface::SCOPE_CONTAINER, $def
    ->getScope());
}