public function testCacheStorage() { $cache = new Cache\Memory(__DIR__); $input = array(array('contents' => 'hehe', 'filename' => 'with contents'), array('filename' => 'no contents')); $expected = array(array('filename' => 'with contents'), array('filename' => 'no contents')); $json = json_encode(array(array(), array())); $output = $cache->cleanContents($input); $this->assertEquals($expected, $output); $this->assertEquals($json, $cache->getForStorage()); $input = json_encode(array(array(), array())); $cache->setFromStorage($input); $this->assertEquals($input, $cache->getForStorage()); }