You are here

public function ResolveInvalidReferencesPassTest::testProcess in Zircon Profile 8

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

File

vendor/symfony/dependency-injection/Tests/Compiler/ResolveInvalidReferencesPassTest.php, line 21

Class

ResolveInvalidReferencesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcess() {
  $container = new ContainerBuilder();
  $def = $container
    ->register('foo')
    ->setArguments(array(
    new Reference('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE),
  ))
    ->addMethodCall('foo', array(
    new Reference('moo', ContainerInterface::IGNORE_ON_INVALID_REFERENCE),
  ));
  $this
    ->process($container);
  $arguments = $def
    ->getArguments();
  $this
    ->assertNull($arguments[0]);
  $this
    ->assertCount(0, $def
    ->getMethodCalls());
}