示例#1
0
 public static function setUpBeforeClass()
 {
     if (!\OC\Memcache\Memcached::isAvailable()) {
         self::markTestSkipped('The memcached extension is not available.');
     }
     $instance = new \OC\Memcache\Memcached(uniqid());
     if ($instance->set(uniqid(), uniqid()) === false) {
         self::markTestSkipped('memcached server seems to be down.');
     }
 }
示例#2
0
 /**
  * check if there is a memcache backend available
  *
  * @return bool
  */
 public function isAvailable()
 {
     return XCache::isAvailable() || APCu::isAvailable() || APC::isAvailable() || Memcached::isAvailable();
 }