public function AnalyzeServiceReferencesPassTest::testProcessDetectsReferencesFromInlinedDefinitions in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\AnalyzeServiceReferencesPassTest::testProcessDetectsReferencesFromInlinedDefinitions()
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Compiler/ AnalyzeServiceReferencesPassTest.php, line 62
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
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());
}