]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Cache/RedisCacheDriverTest.php
Replace x() by isset(), !empty() or defaults()
[friendica.git] / tests / src / Core / Cache / RedisCacheDriverTest.php
index e13d95df4d7f4319715c656af9405315b9262ed3..17079f1e0699c6f7476b5be997678979a8788e4f 100644 (file)
@@ -3,37 +3,26 @@
 
 namespace Friendica\Test\src\Core\Cache;
 
-
+/**
+ * @runTestsInSeparateProcesses
+ * @preserveGlobalState disabled
+ */
 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();
        }
 }