You are here

public function AnalyzeServiceReferencesPassTest::testProcessDetectsReferencesFromInlinedDefinitions in Zircon Profile 8.0

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

File

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

Class

AnalyzeServiceReferencesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcessDetectsReferencesFromInlinedDefinitions() {
  $container = new ContainerBuilder();
  $container
    ->register('a');
  $container
    ->register('b')
    ->addArgument(new Definition(null, array(
    $ref = new Reference('a'),
  )));
  $graph = $this
    ->process($container);
  $this
    ->assertCount(1, $refs = $graph
    ->getNode('a')
    ->getInEdges());
  $this
    ->assertSame($ref, $refs[0]
    ->getValue());
}