You are here

public function ResolveInvalidReferencesPassTest::testStrictFlagIsPreserved in Service Container 7

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

File

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

Class

ResolveInvalidReferencesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testStrictFlagIsPreserved() {
  $container = new ContainerBuilder();
  $container
    ->register('bar');
  $def = $container
    ->register('foo')
    ->addArgument(new Reference('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE, false));
  $this
    ->process($container);
  $this
    ->assertFalse($def
    ->getArgument(0)
    ->isStrict());
}