You are here

public function KernelTest::testInitializeBundleThrowsExceptionWhenRegisteringTwoBundlesWithTheSameName in Zircon Profile 8.0

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

@expectedException \LogicException @expectedExceptionMessage Trying to register two bundles with the same name "DuplicateName"

File

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

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(array(), array(
    $fooBundle,
    $barBundle,
  ));
  $kernel
    ->boot();
}