public function testSave() { $response = json_encode(array(array(), array())); $client = Mockery::mock('Memcached'); $client->shouldReceive('set')->once()->andReturn($response); $cache = new Memcached($client); $cache->save(); }
/** * {@inheritdoc} */ public function save() { $contents = $this->getForStorage(); $expiration = $this->expire === null ? 0 : time() + $this->expire; $this->memcached->set($this->key, $contents, $expiration); }