composer update

This commit is contained in:
2019-06-23 10:14:30 +00:00
parent a56db5ea2b
commit ec4506ebf4
790 changed files with 35767 additions and 7663 deletions

View File

@@ -1508,6 +1508,44 @@ class HttpCacheTest extends HttpCacheTestCase
// Surrogate request
$cache->handle($request, HttpKernelInterface::SUB_REQUEST);
}
public function testTraceHeaderNameCanBeChanged()
{
$this->cacheConfig['trace_header'] = 'X-My-Header';
$this->setNextResponse();
$this->request('GET', '/');
$this->assertTrue($this->response->headers->has('X-My-Header'));
}
public function testTraceLevelDefaultsToFullIfDebug()
{
$this->setNextResponse();
$this->request('GET', '/');
$this->assertTrue($this->response->headers->has('X-Symfony-Cache'));
$this->assertEquals('GET /: miss', $this->response->headers->get('X-Symfony-Cache'));
}
public function testTraceLevelDefaultsToNoneIfNotDebug()
{
$this->cacheConfig['debug'] = false;
$this->setNextResponse();
$this->request('GET', '/');
$this->assertFalse($this->response->headers->has('X-Symfony-Cache'));
}
public function testTraceLevelShort()
{
$this->cacheConfig['trace_level'] = 'short';
$this->setNextResponse();
$this->request('GET', '/');
$this->assertTrue($this->response->headers->has('X-Symfony-Cache'));
$this->assertEquals('miss', $this->response->headers->get('X-Symfony-Cache'));
}
}
class TestKernel implements HttpKernelInterface

View File

@@ -122,7 +122,9 @@ class HttpCacheTestCase extends TestCase
$this->store = new Store(sys_get_temp_dir().'/http_cache');
$this->cacheConfig['debug'] = true;
if (!isset($this->cacheConfig['debug'])) {
$this->cacheConfig['debug'] = true;
}
$this->esi = $esi ? new Esi() : null;
$this->cache = new HttpCache($this->kernel, $this->store, $this->esi, $this->cacheConfig);