public function CheckCircularReferencesPassTest::testProcessWithFactory in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\CheckCircularReferencesPassTest::testProcessWithFactory()
@expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Compiler/ CheckCircularReferencesPassTest.php, line 50
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
public function testProcessWithFactory() {
$container = new ContainerBuilder();
$container
->register('a', 'stdClass')
->setFactory(array(
new Reference('b'),
'getInstance',
));
$container
->register('b', 'stdClass')
->setFactory(array(
new Reference('a'),
'getInstance',
));
$this
->process($container);
}