Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 9226e21

Browse files
committed
let configuration fail
1 parent 4f7842b commit 9226e21

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function getConfigTreeBuilder()
3737

3838
private function addBundlesSection(ArrayNodeDefinition $root)
3939
{
40-
$bundles = $root->children()->arrayNode('bundles')->children();
40+
$bundles = $root->children()->arrayNode('bundles')->isRequired()->children();
4141

4242
foreach ($this->factories as $factory) {
4343
$config = $bundles

tests/Unit/DependencyInjection/CmfSonataAdminExtensionTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ protected function getContainerExtensions()
2626
);
2727
}
2828

29+
/**
30+
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
31+
*/
32+
public function testThatBundlesAreConfigured()
33+
{
34+
$this->container->setParameter(
35+
'kernel.bundles',
36+
array(
37+
'CmfSeoBundle' => true,
38+
'CmfRoutingBundle' => true,
39+
'SonataDoctrinePHPCRAdminBundle' => true,
40+
'DoctrinePHPCRBundle' => true,
41+
'BurgovKeyValueFormBundle' => true,
42+
)
43+
);
44+
45+
$this->load([]);
46+
}
47+
2948
public function testSeoBundle()
3049
{
3150
$this->container->setParameter(

0 commit comments

Comments
 (0)