]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Cache/MemcacheCacheDriverTest.php
Merge branch 'develop' of https://github.com/friendica/friendica into develop
[friendica.git] / tests / src / Core / Cache / MemcacheCacheDriverTest.php
index 5ed0a3a2e5dd24f6a53393019dd10b57985cad65..db85723af16e41cc967e164c79fc878d3f4a5674 100644 (file)
@@ -6,33 +6,21 @@ namespace Friendica\Test\src\Core\Cache;
 
 use Friendica\Core\Cache\CacheDriverFactory;
 
+/**
+ * @requires extension memcache
+ */
 class MemcacheCacheDriverTest extends MemoryCacheTest
 {
-       /**
-        * @var \Friendica\Core\Cache\IMemoryCacheDriver
-        */
-       private $cache;
-
        protected function getInstance()
        {
-               if (class_exists('Memcache')) {
-                       try {
-                               $this->cache = CacheDriverFactory::create('memcache');
-                       } catch (\Exception $exception) {
-                               throw new \Exception("Memcache - TestCase failed: " . $exception->getMessage(), $exception->getCode(), $exception);
-                       }
-                       return $this->cache;
-               } else {
-                       $this->markTestSkipped('Memcache driver isn\'t available');
-                       return null;
-               }
+               $this->cache = CacheDriverFactory::create('memcache');
+               return $this->cache;
+
        }
 
        public function tearDown()
        {
-               if (class_exists('Memcache')) {
-                       $this->cache->clear(false);
-               }
+               $this->cache->clear(false);
                parent::tearDown();
        }
 }