public function InlineServiceDefinitionsPassTest::testProcessDoesNotInlineWhenAliasedServiceIsNotOfPrototypeScope

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php, line 46

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