public function ContainerBuilderTest::testAddAliases in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testAddAliases()
@covers Symfony\Component\DependencyInjection\ContainerBuilder::addAliases
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ContainerBuilderTest.php, line 249
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testAddAliases() {
$builder = new ContainerBuilder();
$builder
->setAliases(array(
'bar' => 'foo',
));
$builder
->addAliases(array(
'foobar' => 'foo',
));
$aliases = $builder
->getAliases();
$this
->assertTrue(isset($aliases['bar']));
$this
->assertTrue(isset($aliases['foobar']));
}