@expectedException \LogicException
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();
}