Skip to content

Commit

Permalink
merged branch bamarni/issue-6830 (PR #7408)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Mar 18, 2013
2 parents 7b76392 + 54609b9 commit 46341e1
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -66,11 +66,17 @@ public function testRemovesEntriesForKeyWithPurge()
{
$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'));
}

Expand Down

0 comments on commit 46341e1

Please sign in to comment.