public function KernelTest::testInitializeBundlesSupportsArbitraryBundleRegistrationOrder 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::testInitializeBundlesSupportsArbitraryBundleRegistrationOrder()
File
- vendor/
symfony/ http-kernel/ Tests/ KernelTest.php, line 661
Class
Namespace
Symfony\Component\HttpKernel\TestsCode
public function testInitializeBundlesSupportsArbitraryBundleRegistrationOrder() {
$grandparent = $this
->getBundle(null, null, 'GrandParentCBundle');
$parent = $this
->getBundle(null, 'GrandParentCBundle', 'ParentCBundle');
$child = $this
->getBundle(null, 'ParentCBundle', 'ChildCBundle');
// use test kernel so we can access getBundleMap()
$kernel = $this
->getKernelForTest(array(
'registerBundles',
));
$kernel
->expects($this
->once())
->method('registerBundles')
->will($this
->returnValue(array(
$parent,
$grandparent,
$child,
)));
$kernel
->boot();
$map = $kernel
->getBundleMap();
$this
->assertEquals(array(
$child,
$parent,
$grandparent,
), $map['GrandParentCBundle']);
$this
->assertEquals(array(
$child,
$parent,
), $map['ParentCBundle']);
$this
->assertEquals(array(
$child,
), $map['ChildCBundle']);
}