You are here

public function AnalyzeServiceReferencesPassTest::testProcessDoesNotSaveDuplicateReferences in Zircon Profile 8

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

File

vendor/symfony/dependency-injection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php, line 103

Class

AnalyzeServiceReferencesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcessDoesNotSaveDuplicateReferences() {
  $container = new ContainerBuilder();
  $container
    ->register('a');
  $container
    ->register('b')
    ->addArgument(new Definition(null, array(
    $ref1 = new Reference('a'),
  )))
    ->addArgument(new Definition(null, array(
    $ref2 = new Reference('a'),
  )));
  $graph = $this
    ->process($container);
  $this
    ->assertCount(2, $graph
    ->getNode('a')
    ->getInEdges());
}