public function ContainerBuilderTest::testExtensionConfig 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::testExtensionConfig()
@covers Symfony\Component\DependencyInjection\ContainerBuilder::getExtensionConfig @covers Symfony\Component\DependencyInjection\ContainerBuilder::prependExtensionConfig
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ContainerBuilderTest.php, line 801
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testExtensionConfig() {
$container = new ContainerBuilder();
$configs = $container
->getExtensionConfig('foo');
$this
->assertEmpty($configs);
$first = array(
'foo' => 'bar',
);
$container
->prependExtensionConfig('foo', $first);
$configs = $container
->getExtensionConfig('foo');
$this
->assertEquals(array(
$first,
), $configs);
$second = array(
'ding' => 'dong',
);
$container
->prependExtensionConfig('foo', $second);
$configs = $container
->getExtensionConfig('foo');
$this
->assertEquals(array(
$second,
$first,
), $configs);
}