You are here

public function ResolveDefinitionTemplatesPassTest::testProcessAppendsMethodCallsAlways in Zircon Profile 8

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

File

vendor/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php, line 40

Class

ResolveDefinitionTemplatesPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testProcessAppendsMethodCallsAlways() {
  $container = new ContainerBuilder();
  $container
    ->register('parent')
    ->addMethodCall('foo', array(
    'bar',
  ));
  $container
    ->setDefinition('child', new DefinitionDecorator('parent'))
    ->addMethodCall('bar', array(
    'foo',
  ));
  $this
    ->process($container);
  $def = $container
    ->getDefinition('child');
  $this
    ->assertEquals(array(
    array(
      'foo',
      array(
        'bar',
      ),
    ),
    array(
      'bar',
      array(
        'foo',
      ),
    ),
  ), $def
    ->getMethodCalls());
}