You are here

public function ResolveReferencesToAliasesPassTest::testProcessRecursively 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/ResolveReferencesToAliasesPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\ResolveReferencesToAliasesPassTest::testProcessRecursively()

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php, line 35

Class

ResolveReferencesToAliasesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcessRecursively() {
  $container = new ContainerBuilder();
  $container
    ->setAlias('bar', 'foo');
  $container
    ->setAlias('moo', 'bar');
  $def = $container
    ->register('foobar')
    ->setArguments(array(
    new Reference('moo'),
  ));
  $this
    ->process($container);
  $arguments = $def
    ->getArguments();
  $this
    ->assertEquals('foo', (string) $arguments[0]);
}