You are here

public function ResolveInvalidReferencesPassTest::testStrictFlagIsPreserved in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Tests/Compiler/ResolveInvalidReferencesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\ResolveInvalidReferencesPassTest::testStrictFlagIsPreserved()

File

vendor/symfony/dependency-injection/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());
}