public function ContainerBuilderTest::testCreateServiceMethodCalls in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testCreateServiceMethodCalls()
@covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
File
- vendor/
symfony/ dependency-injection/ Tests/ ContainerBuilderTest.php, line 378
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testCreateServiceMethodCalls() {
$builder = new ContainerBuilder();
$builder
->register('bar', 'stdClass');
$builder
->register('foo1', 'Bar\\FooClass')
->addMethodCall('setBar', array(
array(
'%value%',
new Reference('bar'),
),
));
$builder
->setParameter('value', 'bar');
$this
->assertEquals(array(
'bar',
$builder
->get('bar'),
), $builder
->get('foo1')->bar, '->createService() replaces the values in the method calls arguments');
}