public function InlineServiceDefinitionsPassTest::testProcessInlinesPrivateFactoryReference 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::testProcessInlinesPrivateFactoryReference()
File
- vendor/
symfony/ dependency-injection/ 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]);
}