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