public function InlineServiceDefinitionsPassTest::testProcessInlinesIfMultipleReferencesButAllFromTheSameDefinition in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/Compiler/InlineServiceDefinitionsPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\InlineServiceDefinitionsPassTest::testProcessInlinesIfMultipleReferencesButAllFromTheSameDefinition()
File
- vendor/
symfony/ dependency-injection/ Tests/ Compiler/ InlineServiceDefinitionsPassTest.php, line 93
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
public function testProcessInlinesIfMultipleReferencesButAllFromTheSameDefinition() {
$container = new ContainerBuilder();
$a = $container
->register('a')
->setPublic(false);
$b = $container
->register('b')
->addArgument(new Reference('a'))
->addArgument(new Definition(null, array(
new Reference('a'),
)));
$this
->process($container);
$arguments = $b
->getArguments();
$this
->assertSame($a, $arguments[0]);
$inlinedArguments = $arguments[1]
->getArguments();
$this
->assertSame($a, $inlinedArguments[0]);
}