You are here

public function CheckCircularReferencesPassTest::testDeepCircularReference in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\CheckCircularReferencesPassTest::testDeepCircularReference()

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

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php, line 99

Class

CheckCircularReferencesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testDeepCircularReference() {
  $container = new ContainerBuilder();
  $container
    ->register('a')
    ->addArgument(new Reference('b'));
  $container
    ->register('b')
    ->addArgument(new Reference('c'));
  $container
    ->register('c')
    ->addArgument(new Reference('b'));
  $this
    ->process($container);
}