public function testStopwatchStopControllerOnRequestEvent() {
$stopwatch = $this
->getMockBuilder('Symfony\\Component\\Stopwatch\\Stopwatch')
->setMethods(array(
'isStarted',
'stop',
'stopSection',
))
->getMock();
$stopwatch
->expects($this
->once())
->method('isStarted')
->will($this
->returnValue(true));
$stopwatch
->expects($this
->once())
->method('stop');
$stopwatch
->expects($this
->once())
->method('stopSection');
$dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch);
$kernel = $this
->getHttpKernel($dispatcher, function () {
return new Response();
});
$request = Request::create('/');
$kernel
->handle($request);
}