Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function delete($sessionId)
 {
     $this->redis->del('sess_' . $sessionId);
 }
 /**
  * @expectedException \mako\redis\RedisException
  * @expectedExcetionMessage \mako\redis\Redis::response(): Unable to handle server response.
  */
 public function testInvalidResponse()
 {
     $connection = m::mock('mako\\redis\\Connection');
     $connection->shouldReceive('write')->once();
     $connection->shouldReceive('gets')->once()->andReturn("foobar");
     $redis = new Redis($connection);
     $redis->foobar();
 }
Beispiel #3
0
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     return (bool) $this->redis->flushdb();
 }