You are here

public function InlineServiceDefinitionsPassTest::testProcessDoesNotInlineWhenAliasedServiceIsNotOfPrototypeScope in Zircon Profile 8

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

File

vendor/symfony/dependency-injection/Tests/Compiler/InlineServiceDefinitionsPassTest.php, line 44

Class

InlineServiceDefinitionsPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcessDoesNotInlineWhenAliasedServiceIsNotOfPrototypeScope() {
  $container = new ContainerBuilder();
  $container
    ->register('foo')
    ->setPublic(false);
  $container
    ->setAlias('moo', 'foo');
  $container
    ->register('service')
    ->setArguments(array(
    $ref = new Reference('foo'),
  ));
  $this
    ->process($container);
  $arguments = $container
    ->getDefinition('service')
    ->getArguments();
  $this
    ->assertSame($ref, $arguments[0]);
}