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