public function InlineServiceDefinitionsPassTest::testProcessInlinesOnlyIfSameScope in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\InlineServiceDefinitionsPassTest::testProcessInlinesOnlyIfSameScope()
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Compiler/ InlineServiceDefinitionsPassTest.php, line 191
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
public function testProcessInlinesOnlyIfSameScope() {
$container = new ContainerBuilder();
$container
->addScope(new Scope('foo'));
$a = $container
->register('a')
->setPublic(false)
->setScope('foo');
$b = $container
->register('b')
->addArgument(new Reference('a'));
$this
->process($container);
$arguments = $b
->getArguments();
$this
->assertEquals(new Reference('a'), $arguments[0]);
$this
->assertTrue($container
->hasDefinition('a'));
}