public function testRegisteredAndLoadedExtension()
{
$extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock();
$extension->expects($this->exactly(2))->method('getAlias')->will($this->returnValue('project'));
$extension->expects($this->once())->method('load')->with(array(array('foo' => 'bar')));
$container = new ContainerBuilder();
$container->setResourceTracking(false);
$container->registerExtension($extension);
$container->loadFromExtension('project', array('foo' => 'bar'));
$container->compile();
}