public function KernelTest::testInitializeBundlesSupportInheritanceCascade in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/KernelTest.php \Symfony\Component\HttpKernel\Tests\KernelTest::testInitializeBundlesSupportInheritanceCascade()
File
- vendor/
symfony/ http-kernel/ Tests/ KernelTest.php, line 629
Class
Namespace
Symfony\Component\HttpKernel\TestsCode
public function testInitializeBundlesSupportInheritanceCascade() {
$grandparent = $this
->getBundle(null, null, 'GrandParentBBundle');
$parent = $this
->getBundle(null, 'GrandParentBBundle', 'ParentBBundle');
$child = $this
->getBundle(null, 'ParentBBundle', 'ChildBBundle');
// use test kernel so we can access getBundleMap()
$kernel = $this
->getKernelForTest(array(
'registerBundles',
));
$kernel
->expects($this
->once())
->method('registerBundles')
->will($this
->returnValue(array(
$grandparent,
$parent,
$child,
)));
$kernel
->boot();
$map = $kernel
->getBundleMap();
$this
->assertEquals(array(
$child,
$parent,
$grandparent,
), $map['GrandParentBBundle']);
$this
->assertEquals(array(
$child,
$parent,
), $map['ParentBBundle']);
$this
->assertEquals(array(
$child,
), $map['ChildBBundle']);
}