You are here

public function ContainerBuilderTest::testAddAliases in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testAddAliases()

@covers Symfony\Component\DependencyInjection\ContainerBuilder::addAliases

File

vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php, line 249

Class

ContainerBuilderTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

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']));
}