Example #1
0
 protected function _addServerOrSkipTest($host, $port)
 {
     $socket = @fsockopen($host, $port);
     if (is_resource($socket)) {
         @fclose($socket);
         $this->rediska->addServer($host, $port, array('persistent' => true));
     } else {
         $this->markTestSkipped("You must start server {$host}:{$port} before run test");
     }
 }