public function testPutData() { $data = ['s' => 4.5895, 'e' => 137.4417]; $this->file_cache->putData($this->test_file_name, $data); $file_name = $this->getFileName(); $contents = file_get_contents($file_name); $this->assertEquals($contents, json_encode($data)); }
/** * Removes a site from the sites cache * * @param string $sitename Name of site to remove from array * @return void */ public function remove($sitename) { $cache = (array) $this->cache->getData($this->cachekey, array('decode_array' => true)); unset($cache[$sitename]); $this->cache->putData($this->cachekey, $cache); }