diff options
author | Andreas Fischer <bantu@owncloud.com> | 2013-12-09 14:31:35 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2013-12-09 14:33:26 +0100 |
commit | 67310b60f738eebd7d4f121cd4ff1e838da2f51a (patch) | |
tree | 90f90c0d2c3992db6bff4134752cfd3a8daccc75 /tests/lib/memcache | |
parent | a67c737848389d32cd77512d06186db868eb5ac9 (diff) | |
download | nextcloud-server-67310b60f738eebd7d4f121cd4ff1e838da2f51a.tar.gz nextcloud-server-67310b60f738eebd7d4f121cd4ff1e838da2f51a.zip |
Ensure memcached extension is there before attempting to create an instance.
Diffstat (limited to 'tests/lib/memcache')
-rw-r--r-- | tests/lib/memcache/memcached.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/lib/memcache/memcached.php b/tests/lib/memcache/memcached.php index 67d39717892..fdab32693ff 100644 --- a/tests/lib/memcache/memcached.php +++ b/tests/lib/memcache/memcached.php @@ -11,6 +11,9 @@ namespace Test\Memcache; class Memcached extends Cache { static public function setUpBeforeClass() { + if (!\OC\Memcache\Memcached::isAvailable()) { + self::markTestSkipped('The memcached extension is not available.'); + } $instance = new \OC\Memcache\Memcached(uniqid()); if ($instance->set(uniqid(), uniqid()) === false) { self::markTestSkipped('memcached server seems to be down.'); @@ -18,10 +21,6 @@ class Memcached extends Cache { } public function setUp() { - if (!\OC\Memcache\Memcached::isAvailable()) { - $this->markTestSkipped('The memcached extension is not available.'); - return; - } $this->instance = new \OC\Memcache\Memcached(uniqid()); } } |