public function TraceableEventDispatcherTest::testStopwatchSections in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php \Symfony\Component\HttpKernel\Tests\Debug\TraceableEventDispatcherTest::testStopwatchSections()
File
- vendor/
symfony/ http-kernel/ Tests/ Debug/ TraceableEventDispatcherTest.php, line 23
Class
Namespace
Symfony\Component\HttpKernel\Tests\DebugCode
public function testStopwatchSections() {
$dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch = new Stopwatch());
$kernel = $this
->getHttpKernel($dispatcher, function () {
return new Response();
});
$request = Request::create('/');
$response = $kernel
->handle($request);
$kernel
->terminate($request, $response);
$events = $stopwatch
->getSectionEvents($response->headers
->get('X-Debug-Token'));
$this
->assertEquals(array(
'__section__',
'kernel.request',
'kernel.controller',
'controller',
'kernel.response',
'kernel.terminate',
), array_keys($events));
}