X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FWallabagCoreTestCase.php;h=7bf4b43ce8f32ee462aaec0187e44df448dcea76;hb=e4cf672ccf61689ba28c2e89fc55f83167800b18;hp=c0055888a255eaa44aa88d52f5630ff50e5c6147;hpb=2f9927404d620f719d4b30d9205ff43c0238e6a1;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php index c0055888..7bf4b43c 100644 --- a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php +++ b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php @@ -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'); + } + } }