public function AnalyzeServiceReferencesPassTest::testProcessDetectsReferencesFromInlinedFactoryDefinitions 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::testProcessDetectsReferencesFromInlinedFactoryDefinitions()
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Compiler/ AnalyzeServiceReferencesPassTest.php, line 81
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
public function testProcessDetectsReferencesFromInlinedFactoryDefinitions() {
$container = new ContainerBuilder();
$container
->register('a');
$factory = new Definition();
$factory
->setFactory(array(
new Reference('a'),
'a',
));
$container
->register('b')
->addArgument($factory);
$graph = $this
->process($container);
$this
->assertTrue($graph
->hasNode('a'));
$this
->assertCount(1, $refs = $graph
->getNode('a')
->getInEdges());
}