Exemplo n.º 1
0
 public function disconnect($force = false)
 {
     if (!$this->connectWasCalled) {
         // if we never actually connected, we don't have to actually disconnect
         return true;
     }
     return $this->conn->disconnect($force);
 }
Exemplo n.º 2
0
 public function testConnectionError()
 {
     $this->redis->disconnect();
     try {
         $this->redis->get('anything');
         $this->fail('Getting from a non connected redis should throw a ConnectionError');
     } catch (ConnectionError $e) {
         // everything is fine here
     }
 }