public function testBootSetsTheContainerToTheBundles() {
$bundle = $this
->getMockBuilder('Symfony\\Component\\HttpKernel\\Bundle\\Bundle')
->disableOriginalConstructor()
->getMock();
$bundle
->expects($this
->once())
->method('setContainer');
$kernel = $this
->getMockBuilder('Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\KernelForTest')
->disableOriginalConstructor()
->setMethods(array(
'initializeBundles',
'initializeContainer',
'getBundles',
))
->getMock();
$kernel
->expects($this
->once())
->method('getBundles')
->will($this
->returnValue(array(
$bundle,
)));
$kernel
->boot();
}