You are here

public function ResolveInvalidReferencesPassTest::testProcessRemovesPropertiesOnInvalid 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/ResolveInvalidReferencesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\ResolveInvalidReferencesPassTest::testProcessRemovesPropertiesOnInvalid()

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php, line 51

Class

ResolveInvalidReferencesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcessRemovesPropertiesOnInvalid() {
  $container = new ContainerBuilder();
  $def = $container
    ->register('foo')
    ->setProperty('foo', new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE));
  $this
    ->process($container);
  $this
    ->assertEquals(array(), $def
    ->getProperties());
}