@covers Symfony\Component\DependencyInjection\ContainerBuilder::getAliases
public function testGetAliases() {
$builder = new ContainerBuilder();
$builder
->setAlias('bar', 'foo');
$builder
->setAlias('foobar', 'foo');
$builder
->setAlias('moo', new Alias('foo', false));
$aliases = $builder
->getAliases();
$this
->assertEquals('foo', (string) $aliases['bar']);
$this
->assertTrue($aliases['bar']
->isPublic());
$this
->assertEquals('foo', (string) $aliases['foobar']);
$this
->assertEquals('foo', (string) $aliases['moo']);
$this
->assertFalse($aliases['moo']
->isPublic());
$builder
->register('bar', 'stdClass');
$this
->assertFalse($builder
->hasAlias('bar'));
$builder
->set('foobar', 'stdClass');
$builder
->set('moo', 'stdClass');
$this
->assertCount(0, $builder
->getAliases(), '->getAliases() does not return aliased services that have been overridden');
}