You are here

public function KernelTest::testInitializeBundles in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/KernelTest.php \Symfony\Component\HttpKernel\Tests\KernelTest::testInitializeBundles()

File

vendor/symfony/http-kernel/Tests/KernelTest.php, line 611

Class

KernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

public function testInitializeBundles() {
  $parent = $this
    ->getBundle(null, null, 'ParentABundle');
  $child = $this
    ->getBundle(null, 'ParentABundle', 'ChildABundle');

  // use test kernel so we can access getBundleMap()
  $kernel = $this
    ->getKernelForTest(array(
    'registerBundles',
  ));
  $kernel
    ->expects($this
    ->once())
    ->method('registerBundles')
    ->will($this
    ->returnValue(array(
    $parent,
    $child,
  )));
  $kernel
    ->boot();
  $map = $kernel
    ->getBundleMap();
  $this
    ->assertEquals(array(
    $child,
    $parent,
  ), $map['ParentABundle']);
}