public function testRegisteredAndLoadedExtension() {
if (!class_exists('Symfony\\Component\\Config\\Resource\\FileResource')) {
$this
->markTestSkipped('The "Config" component is not available');
}
$extension = $this
->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface');
$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
->registerExtension($extension);
$container
->loadFromExtension('project', array(
'foo' => 'bar',
));
$container
->compile();
}