$request = Request::create('/'); $request->headers->set('If-Modified-Since', $response->getLastModified()->format('D, d M Y H:i:s').' GMT'); $isNotModified = $response->isNotModified($request); $this->assertTrue($isNotModified); $response->prepare($request);