Ejemplo n.º 1
0
 /**
  * Tests working connection.
  */
 public function testAllOk()
 {
     // Skip the test if no memcache connection is defined
     if (empty($GLOBALS['memcache'])) {
         $this->markTestSkipped('Memcached not set');
     }
     $servers = explode(',', $GLOBALS['memcache']);
     list($ip, $port) = explode(':', $servers[0]);
     $test = new Memcached('Memcached', $ip, $port);
     $result = $test->run();
     $this->assertEquals(\Jyxo\Beholder\Result::SUCCESS, $result->getStatus());
     $this->assertEquals(sprintf('%s:%s', gethostbyaddr($ip), $port), $result->getDescription());
 }