public function ContainerBuilderTest::testRegisteredAndLoadedExtension in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testRegisteredAndLoadedExtension()
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ContainerBuilderTest.php, line 666
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testRegisteredAndLoadedExtension() {
$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
->setResourceTracking(false);
$container
->registerExtension($extension);
$container
->loadFromExtension('project', array(
'foo' => 'bar',
));
$container
->compile();
}