You are here

public function CheckCircularReferencesPassTest::testProcessWithFactory in Zircon Profile 8.0

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

@expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException

File

vendor/symfony/dependency-injection/Tests/Compiler/CheckCircularReferencesPassTest.php, line 50

Class

CheckCircularReferencesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

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);
}