summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-01-15 00:23:12 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-01-15 00:23:12 +0100
commit925a680a24c76587eadc5a699304f90625000659 (patch)
treec2a180ddf16e4b6cd6b3e80195aedbfb123ad781
parent337c43ce9266106c803e6593e2006fd2b11b4f81 (diff)
parent567c246094e96ecfa5aca0fcbc321c3340699283 (diff)
downloadnextcloud-server-925a680a24c76587eadc5a699304f90625000659.tar.gz
nextcloud-server-925a680a24c76587eadc5a699304f90625000659.zip
Merge pull request #13354 from owncloud/hhvm-redis
HHVM: Prevent E_WARNING messages by Redis test in console output.
-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.');
}