public function KernelTest::testInitializeBundleThrowsExceptionWhenRegisteringTwoBundlesWithTheSameName

@expectedException \LogicException

File

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

Class

KernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

public function testInitializeBundleThrowsExceptionWhenRegisteringTwoBundlesWithTheSameName() {
  $fooBundle = $this
    ->getBundle(null, null, 'FooBundle', 'DuplicateName');
  $barBundle = $this
    ->getBundle(null, null, 'BarBundle', 'DuplicateName');
  $kernel = $this
    ->getKernel();
  $kernel
    ->expects($this
    ->once())
    ->method('registerBundles')
    ->will($this
    ->returnValue(array(
    $fooBundle,
    $barBundle,
  )));
  $kernel
    ->initializeBundles();
}