public function testKernelResponseDoesNotStartSession() { $kernel = $this->getMock(HttpKernelInterface::class); $request = new Request(); $session = new Session(new MockArraySessionStorage()); $request->setSession($session); $response = new Response(); $c = new RequestDataCollector(); $c->onKernelResponse(new FilterResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, $response)); $this->assertFalse($session->isStarted()); }