public function testDeleteRecursive() { $tempDir = $this->createTempDir('ezcCacheStorageFileTest'); $cache = new ezcCacheStorageFileArray($tempDir, array('extension' => '.c')); $data = array("foo" => array('attributes' => array('lang' => 'en', 'section' => 'articles'), 'content' => array('lang' => 'en', 'section' => 'articles')), "foo/bar" => array('attributes' => array('lang' => 'de', 'section' => 'articles'), 'content' => array('lang' => 'de', 'section' => 'articles')), "foo/baz" => array('attributes' => array('lang' => 'no', 'section' => 'articles'), 'content' => array('lang' => 'no', 'section' => 'articles'))); foreach ($data as $id => $dataArr) { $cache->store($id, $dataArr['content'], $dataArr['attributes']); } $deleted = $cache->delete(null, array("section" => "articles"), true); $this->assertEquals(array_keys($data), $deleted, 'Deleted keys not returned correctly from delete().'); $this->removeTempDir(); }