File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/Symfony/Component/HttpKernel/Tests/HttpCache Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,17 @@ public function testRemovesEntriesForKeyWithPurge()
66
66
{
67
67
$ request = Request::create ('/foo ' );
68
68
$ this ->store ->write ($ request , new Response ('foo ' ));
69
- $ this ->assertNotEmpty ($ this ->getStoreMetadata ($ request ));
69
+
70
+ $ metadata = $ this ->getStoreMetadata ($ request );
71
+ $ this ->assertNotEmpty ($ metadata );
70
72
71
73
$ this ->assertTrue ($ this ->store ->purge ('/foo ' ));
72
74
$ this ->assertEmpty ($ this ->getStoreMetadata ($ request ));
73
75
76
+ // cached content should be kept after purging
77
+ $ path = $ this ->store ->getPath ($ metadata [0 ][1 ]['x-content-digest ' ][0 ]);
78
+ $ this ->assertTrue (is_file ($ path ));
79
+
74
80
$ this ->assertFalse ($ this ->store ->purge ('/bar ' ));
75
81
}
76
82
You can’t perform that action at this time.
0 commit comments