summaryrefslogtreecommitdiffstats
path: root/lib/private/memcache
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2015-07-16 03:53:18 +0100
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2015-07-16 03:53:18 +0100
commit8efa23c895dc5ca6ad3216b26d4178cc9e5e839a (patch)
treec47a8547250c13f15e5cd5eae0f0cec772adb77c /lib/private/memcache
parente556d97b6472ab32fabf2fbc716b319fbc923ce9 (diff)
downloadnextcloud-server-8efa23c895dc5ca6ad3216b26d4178cc9e5e839a.tar.gz
nextcloud-server-8efa23c895dc5ca6ad3216b26d4178cc9e5e839a.zip
Fix memcache factory unit tests
Diffstat (limited to 'lib/private/memcache')
-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,