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