summaryrefslogtreecommitdiffstats
path: root/tests/lib/memcache
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2015-01-14 14:46:22 +0100
committerAndreas Fischer <bantu@owncloud.com>2015-01-14 14:46:22 +0100
commit567c246094e96ecfa5aca0fcbc321c3340699283 (patch)
treee21d17ab15241396c06f587a692301ac06fc7e2a /tests/lib/memcache
parent3a6d2fcc102a7e9c62a2233ccc50691470741337 (diff)
downloadnextcloud-server-567c246094e96ecfa5aca0fcbc321c3340699283.tar.gz
nextcloud-server-567c246094e96ecfa5aca0fcbc321c3340699283.zip
HHVM: Prevent E_WARNING messages by Redis test in console output.
Diffstat (limited to 'tests/lib/memcache')
-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.');
}