merged branch bamarni/issue-6830 (PR #7408)

This PR was merged into the 2.1 branch.

Commits
-------

54609b9 [HttpCache] added a test (cached content should be kept after purging)

Discussion
----------

[HttpCache] added a test (cached content should be kept after purging)

closes #6830
This commit is contained in:
Fabien Potencier 2013-03-18 19:53:03 +01:00
commit 46341e171a

View File

@ -66,11 +66,17 @@ class StoreTest extends \PHPUnit_Framework_TestCase
{
$request = Request::create('/foo');
$this->store->write($request, new Response('foo'));
$this->assertNotEmpty($this->getStoreMetadata($request));
$metadata = $this->getStoreMetadata($request);
$this->assertNotEmpty($metadata);
$this->assertTrue($this->store->purge('/foo'));
$this->assertEmpty($this->getStoreMetadata($request));
// cached content should be kept after purging
$path = $this->store->getPath($metadata[0][1]['x-content-digest'][0]);
$this->assertTrue(is_file($path));
$this->assertFalse($this->store->purge('/bar'));
}