summaryrefslogtreecommitdiffstats
path: root/tests/lib/memcache/redis.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/memcache/redis.php')
-rw-r--r--tests/lib/memcache/redis.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/memcache/redis.php b/tests/lib/memcache/redis.php
index c0bd18b46f9..2e3c5d735fe 100644
--- a/tests/lib/memcache/redis.php
+++ b/tests/lib/memcache/redis.php
@@ -16,7 +16,17 @@ class Redis extends Cache {
if (!\OC\Memcache\Redis::isAvailable()) {
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());
+ restore_error_handler();
+
if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) {
self::markTestSkipped('redis server seems to be down.');
}