public function testHandleBootsTheKernel() {
$type = HttpKernelInterface::MASTER_REQUEST;
$catch = true;
$request = new Request();
$httpKernelMock = $this
->getMockBuilder('Symfony\\Component\\HttpKernel\\HttpKernel')
->disableOriginalConstructor()
->getMock();
$kernel = $this
->getMockBuilder('Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\KernelForTest')
->disableOriginalConstructor()
->setMethods(array(
'getHttpKernel',
'boot',
))
->getMock();
$kernel
->expects($this
->once())
->method('getHttpKernel')
->will($this
->returnValue($httpKernelMock));
$kernel
->expects($this
->once())
->method('boot');
// required as this value is initialized
// in the kernel constructor, which we don't call
$kernel
->setIsBooted(false);
$kernel
->handle($request, $type, $catch);
}