public function ContainerBuilderTest::testCreateServiceWithExpression 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::testCreateServiceWithExpression()
File
- vendor/
symfony/ dependency-injection/ Tests/ ContainerBuilderTest.php, line 427
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testCreateServiceWithExpression() {
$builder = new ContainerBuilder();
$builder
->setParameter('bar', 'bar');
$builder
->register('bar', 'BarClass');
$builder
->register('foo', 'Bar\\FooClass')
->addArgument(array(
'foo' => new Expression('service("bar").foo ~ parameter("bar")'),
));
$this
->assertEquals('foobar', $builder
->get('foo')->arguments['foo']);
}