use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Contracts\EventDispatcher\Event;
class TraceableEventDispatcherTest extends TestCase
{ public function testStopwatchSections() { $dispatcher =
new TraceableEventDispatcher(new EventDispatcher(),
$stopwatch =
new Stopwatch());
$kernel =
$this->
getHttpKernel($dispatcher);
$request = Request::
create('/'
);
$response =
$kernel->
handle($request);
$kernel->
terminate($request,
$response);
$events =
$stopwatch->
getSectionEvents($request->attributes->
get('_stopwatch_token'
));
$this->
assertEquals([ '__section__',
'kernel.request',
'kernel.controller',
'kernel.controller_arguments',