phalApiCacheMulti = new PhalApi_Cache_Multi(); $fileCache = new PhalApi_Cache_File(array('path' => dirname(__FILE__))); $this->phalApiCacheMulti->addCache($fileCache); } protected function tearDown() { } /** * @group testAddCache */ public function testAddCache() { $cache = new PhalApi_Cache_None(); $rs = $this->phalApiCacheMulti->addCache($cache); } /** * @group testSet */ public function testSet() { $key = 'multiKey'; $value = 'haha~'; $expire = '100'; $rs = $this->phalApiCacheMulti->set($key, $value, $expire); } /** * @group testGet * @depends testSet */ public function testGet() { $key = 'multiKey'; $rs = $this->phalApiCacheMulti->get($key); $this->assertSame('haha~', $rs); } /** * @group testDelete */ public function testDelete() { $key = 'multiKey'; $rs = $this->phalApiCacheMulti->delete($key); } }