summaryrefslogtreecommitdiffstats
path: root/lib/private/memcache/factory.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/memcache/factory.php')
-rw-r--r--lib/private/memcache/factory.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/memcache/factory.php b/lib/private/memcache/factory.php
index a3fc8dfe62c..fe82558e731 100644
--- a/lib/private/memcache/factory.php
+++ b/lib/private/memcache/factory.php
@@ -82,7 +82,7 @@ class Factory implements ICacheFactory {
$missingCacheMessage = 'Memcache {class} not available for {use} cache';
$missingCacheHint = 'Is the matching PHP module installed and enabled?';
if (!$localCacheClass::isAvailable()) {
- if (\OC::$CLI) {
+ if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
// CLI should not hard-fail on broken memcache
$this->logger->info($missingCacheMessage, [
'class' => $localCacheClass,
@@ -97,7 +97,7 @@ class Factory implements ICacheFactory {
}
}
if (!$distributedCacheClass::isAvailable()) {
- if (\OC::$CLI) {
+ if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
// CLI should not hard-fail on broken memcache
$this->logger->info($missingCacheMessage, [
'class' => $distributedCacheClass,