update 1.0.8.0

Commits for version update
This commit is contained in:
Manish Verma
2016-10-17 12:02:27 +05:30
parent dec927987b
commit 76e85db070
9674 changed files with 495757 additions and 58922 deletions

View File

@@ -181,6 +181,31 @@ class HttpCacheTest extends HttpCacheTestCase
$this->assertEquals(304, $this->response->getStatusCode());
}
public function testIncrementsMaxAgeWhenNoDateIsSpecifiedEventWhenUsingETag()
{
$this->setNextResponse(
200,
array(
'ETag' => '1234',
'Cache-Control' => 'public, s-maxage=60',
)
);
$this->request('GET', '/');
$this->assertHttpKernelIsCalled();
$this->assertEquals(200, $this->response->getStatusCode());
$this->assertTraceContains('miss');
$this->assertTraceContains('store');
sleep(2);
$this->request('GET', '/');
$this->assertHttpKernelIsNotCalled();
$this->assertEquals(200, $this->response->getStatusCode());
$this->assertTraceContains('fresh');
$this->assertEquals(2, $this->response->headers->get('Age'));
}
public function testValidatesPrivateResponsesCachedOnTheClient()
{
$this->setNextResponse(200, array(), '', function ($request, $response) {