diff options
Diffstat (limited to 'tests/lib/memcache')
-rw-r--r-- | tests/lib/memcache/apc.php | 4 | ||||
-rw-r--r-- | tests/lib/memcache/apcu.php | 4 | ||||
-rw-r--r-- | tests/lib/memcache/cache.php | 4 | ||||
-rw-r--r-- | tests/lib/memcache/memcached.php | 5 | ||||
-rw-r--r-- | tests/lib/memcache/xcache.php | 4 |
5 files changed, 16 insertions, 5 deletions
diff --git a/tests/lib/memcache/apc.php b/tests/lib/memcache/apc.php index e5d753a4fa5..550d5068dc1 100644 --- a/tests/lib/memcache/apc.php +++ b/tests/lib/memcache/apc.php @@ -10,7 +10,9 @@ namespace Test\Memcache; class APC extends Cache { - public function setUp() { + protected function setUp() { + parent::setUp(); + if(!\OC\Memcache\APC::isAvailable()) { $this->markTestSkipped('The apc extension is not available.'); return; diff --git a/tests/lib/memcache/apcu.php b/tests/lib/memcache/apcu.php index 7b99e7cd5e0..1b849e1c54d 100644 --- a/tests/lib/memcache/apcu.php +++ b/tests/lib/memcache/apcu.php @@ -10,7 +10,9 @@ namespace Test\Memcache; class APCu extends Cache { - public function setUp() { + protected function setUp() { + parent::setUp(); + if(!\OC\Memcache\APCu::isAvailable()) { $this->markTestSkipped('The APCu extension is not available.'); return; diff --git a/tests/lib/memcache/cache.php b/tests/lib/memcache/cache.php index d07c492cef0..8a4a708e4b7 100644 --- a/tests/lib/memcache/cache.php +++ b/tests/lib/memcache/cache.php @@ -50,9 +50,11 @@ abstract class Cache extends \Test_Cache { $this->assertFalse($this->instance->hasKey('foo')); } - public function tearDown() { + protected function tearDown() { if ($this->instance) { $this->instance->clear(); } + + parent::tearDown(); } } diff --git a/tests/lib/memcache/memcached.php b/tests/lib/memcache/memcached.php index fdab32693ff..a94b809a7b5 100644 --- a/tests/lib/memcache/memcached.php +++ b/tests/lib/memcache/memcached.php @@ -11,6 +11,8 @@ namespace Test\Memcache; class Memcached extends Cache { static public function setUpBeforeClass() { + parent::setUpBeforeClass(); + if (!\OC\Memcache\Memcached::isAvailable()) { self::markTestSkipped('The memcached extension is not available.'); } @@ -20,7 +22,8 @@ class Memcached extends Cache { } } - public function setUp() { + protected function setUp() { + parent::setUp(); $this->instance = new \OC\Memcache\Memcached(uniqid()); } } diff --git a/tests/lib/memcache/xcache.php b/tests/lib/memcache/xcache.php index f59afda3966..b97d5545c6e 100644 --- a/tests/lib/memcache/xcache.php +++ b/tests/lib/memcache/xcache.php @@ -10,7 +10,9 @@ namespace Test\Memcache; class XCache extends Cache { - public function setUp() { + protected function setUp() { + parent::setUp(); + if (!\OC\Memcache\XCache::isAvailable()) { $this->markTestSkipped('The xcache extension is not available.'); return; |