public function InlineServiceDefinitionsPassTest::testProcessInlinesPrivateFactoryReference in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\InlineServiceDefinitionsPassTest::testProcessInlinesPrivateFactoryReference()
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Compiler/ InlineServiceDefinitionsPassTest.php, line 113
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
public function testProcessInlinesPrivateFactoryReference() {
$container = new ContainerBuilder();
$container
->register('a')
->setPublic(false);
$b = $container
->register('b')
->setPublic(false)
->setFactory(array(
new Reference('a'),
'a',
));
$container
->register('foo')
->setArguments(array(
$ref = new Reference('b'),
));
$this
->process($container);
$inlinedArguments = $container
->getDefinition('foo')
->getArguments();
$this
->assertSame($b, $inlinedArguments[0]);
}