]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/WallabagCoreTestCase.php
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / WallabagCoreTestCase.php
index c0055888a255eaa44aa88d52f5630ff50e5c6147..7bf4b43ce8f32ee462aaec0187e44df448dcea76 100644 (file)
@@ -80,4 +80,17 @@ 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');
+        }
+    }
 }