public function checkConnectionDetails($host, $port, $timeout, $password)
 {
     $redis = new Redis();
     $redis->setConfig($host, $port, $timeout, $password);
     if (!$redis->testConnection()) {
         throw new \Exception('Connection to Redis failed. Please verify Redis host and port');
     }
     $version = $redis->getServerVersion();
     if (version_compare($version, '2.8.0') < 0) {
         throw new \Exception('At least Redis server 2.8.0 is required');
     }
 }
 public function test_checkConnectionDetails_shouldFailIfPortIsWrong()
 {
     $this->redis->setConfig('127.0.0.1', 6370, 0.2, null);
     $success = $this->redis->testConnection();
     $this->assertFalse($success);
 }