HHVM: Prevent E_WARNING messages by Redis test in console output.
This commit is contained in:
parent
3a6d2fcc10
commit
567c246094
|
@ -16,7 +16,17 @@ class Redis extends Cache {
|
||||||
if (!\OC\Memcache\Redis::isAvailable()) {
|
if (!\OC\Memcache\Redis::isAvailable()) {
|
||||||
self::markTestSkipped('The redis extension is not available.');
|
self::markTestSkipped('The redis extension is not available.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_error_handler(
|
||||||
|
function($errno, $errstr) {
|
||||||
|
restore_error_handler();
|
||||||
|
self::markTestSkipped($errstr);
|
||||||
|
},
|
||||||
|
E_WARNING
|
||||||
|
);
|
||||||
$instance = new \OC\Memcache\Redis(self::getUniqueID());
|
$instance = new \OC\Memcache\Redis(self::getUniqueID());
|
||||||
|
restore_error_handler();
|
||||||
|
|
||||||
if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) {
|
if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) {
|
||||||
self::markTestSkipped('redis server seems to be down.');
|
self::markTestSkipped('redis server seems to be down.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue