You are here

public function InlineServiceDefinitionsPassTest::testProcess in Service Container 7

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

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php, line 24

Class

InlineServiceDefinitionsPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcess() {
  $container = new ContainerBuilder();
  $container
    ->register('inlinable.service')
    ->setPublic(false);
  $container
    ->register('service')
    ->setArguments(array(
    new Reference('inlinable.service'),
  ));
  $this
    ->process($container);
  $arguments = $container
    ->getDefinition('service')
    ->getArguments();
  $this
    ->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Definition', $arguments[0]);
  $this
    ->assertSame($container
    ->getDefinition('inlinable.service'), $arguments[0]);
}