public function HttpCacheTestCase::request in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php \Symfony\Component\HttpKernel\Tests\HttpCache\HttpCacheTestCase::request()
53 calls to HttpCacheTestCase::request()
- HttpCacheTest::testAssignsDefaultTtlWhenResponseHasNoFreshnessInformation in vendor/
symfony/ http-kernel/ Tests/ HttpCache/ HttpCacheTest.php - HttpCacheTest::testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpired in vendor/
symfony/ http-kernel/ Tests/ HttpCache/ HttpCacheTest.php - HttpCacheTest::testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304 in vendor/
symfony/ http-kernel/ Tests/ HttpCache/ HttpCacheTest.php - HttpCacheTest::testCachesResponsesWithALastModifiedValidatorButNoFreshnessInformation in vendor/
symfony/ http-kernel/ Tests/ HttpCache/ HttpCacheTest.php - HttpCacheTest::testCachesResponsesWithAMaxAgeDirective in vendor/
symfony/ http-kernel/ Tests/ HttpCache/ HttpCacheTest.php
File
- vendor/
symfony/ http-kernel/ Tests/ HttpCache/ HttpCacheTestCase.php, line 106
Class
Namespace
Symfony\Component\HttpKernel\Tests\HttpCacheCode
public function request($method, $uri = '/', $server = array(), $cookies = array(), $esi = false, $headers = array()) {
if (null === $this->kernel) {
throw new \LogicException('You must call setNextResponse() before calling request().');
}
$this->kernel
->reset();
$this->store = new Store(sys_get_temp_dir() . '/http_cache');
$this->cacheConfig['debug'] = true;
$this->esi = $esi ? new Esi() : null;
$this->cache = new HttpCache($this->kernel, $this->store, $this->esi, $this->cacheConfig);
$this->request = Request::create($uri, $method, array(), $cookies, array(), $server);
$this->request->headers
->add($headers);
$this->response = $this->cache
->handle($this->request, HttpKernelInterface::MASTER_REQUEST, $this->catch);
$this->responses[] = $this->response;
}