]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/WallabagCoreTestCase.php
Some fixes about upgrade from 2.0.x -> 2.1.0
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / WallabagCoreTestCase.php
index c0055888a255eaa44aa88d52f5630ff50e5c6147..4f103921a78cf6c7c56aa36da70cfb48726ec274 100644 (file)
@@ -80,4 +80,19 @@ abstract class WallabagCoreTestCase extends WebTestCase
 
         throw new \RuntimeException('No logged in User.');
     }
+
+    /**
+     * Check if Redis is installed.
+     * If not, mark test as skip.
+     */
+    protected function checkRedis()
+    {
+        try {
+            $this->client->getContainer()->get('wallabag_core.redis.client')->connect();
+        } catch (\Exception $e) {
+            $this->markTestSkipped(
+              'Redis is not installed/activated'
+            );
+        }
+    }
 }