public function DecoratorServicePassTest::testProcessWithAlias in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/Compiler/DecoratorServicePassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\DecoratorServicePassTest::testProcessWithAlias()
File
- vendor/
symfony/ dependency-injection/ Tests/ Compiler/ DecoratorServicePassTest.php, line 51
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
public function testProcessWithAlias() {
$container = new ContainerBuilder();
$container
->register('foo')
->setPublic(true);
$container
->setAlias('foo.alias', new Alias('foo', false));
$fooExtendedDefinition = $container
->register('foo.extended')
->setPublic(true)
->setDecoratedService('foo.alias');
$this
->process($container);
$this
->assertEquals('foo.extended', $container
->getAlias('foo.alias'));
$this
->assertFalse($container
->getAlias('foo.alias')
->isPublic());
$this
->assertEquals('foo', $container
->getAlias('foo.extended.inner'));
$this
->assertFalse($container
->getAlias('foo.extended.inner')
->isPublic());
$this
->assertNull($fooExtendedDefinition
->getDecoratedService());
}