public function testInitializeBundlesSupportInheritanceCascade() {
$grandparent = $this
->getBundle(null, null, 'GrandParentBBundle');
$parent = $this
->getBundle(null, 'GrandParentBBundle', 'ParentBBundle');
$child = $this
->getBundle(null, 'ParentBBundle', 'ChildBBundle');
$kernel = $this
->getKernel();
$kernel
->expects($this
->once())
->method('registerBundles')
->will($this
->returnValue(array(
$grandparent,
$parent,
$child,
)));
$kernel
->initializeBundles();
$map = $kernel
->getBundleMap();
$this
->assertEquals(array(
$child,
$parent,
$grandparent,
), $map['GrandParentBBundle']);
$this
->assertEquals(array(
$child,
$parent,
), $map['ParentBBundle']);
$this
->assertEquals(array(
$child,
), $map['ChildBBundle']);
}