public function KernelTest::testInitializeBundles

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php, line 636

Class

KernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

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