aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/memcache
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-12-09 01:02:42 +0100
committerAndreas Fischer <bantu@owncloud.com>2013-12-09 01:02:42 +0100
commita67c737848389d32cd77512d06186db868eb5ac9 (patch)
treeb80af1cd20be3f5d081354c50b1768c56b3ec0bd /tests/lib/memcache
parent079d20a80e9412ae7787ce689d46e9b3859b348b (diff)
downloadnextcloud-server-a67c737848389d32cd77512d06186db868eb5ac9.tar.gz
nextcloud-server-a67c737848389d32cd77512d06186db868eb5ac9.zip
Only run memcached tests if server is available.
Diffstat (limited to 'tests/lib/memcache')
-rw-r--r--tests/lib/memcache/memcached.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lib/memcache/memcached.php b/tests/lib/memcache/memcached.php
index 4b38ae8ef3c..67d39717892 100644
--- a/tests/lib/memcache/memcached.php
+++ b/tests/lib/memcache/memcached.php
@@ -10,6 +10,13 @@
namespace Test\Memcache;
class Memcached extends Cache {
+ static public function setUpBeforeClass() {
+ $instance = new \OC\Memcache\Memcached(uniqid());
+ if ($instance->set(uniqid(), uniqid()) === false) {
+ self::markTestSkipped('memcached server seems to be down.');
+ }
+ }
+
public function setUp() {
if (!\OC\Memcache\Memcached::isAvailable()) {
$this->markTestSkipped('The memcached extension is not available.');