Fix Redis tests
This commit is contained in:
parent
8c9f181822
commit
f524c85161
@ -33,9 +33,10 @@ abstract class AbstractRedisAdapterTest extends AdapterTestCase
|
|||||||
if (!\extension_loaded('redis')) {
|
if (!\extension_loaded('redis')) {
|
||||||
self::markTestSkipped('Extension redis required.');
|
self::markTestSkipped('Extension redis required.');
|
||||||
}
|
}
|
||||||
if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) {
|
try {
|
||||||
$e = error_get_last();
|
(new \Redis())->connect(getenv('REDIS_HOST'));
|
||||||
self::markTestSkipped($e['message']);
|
} catch (\Exception $e) {
|
||||||
|
self::markTestSkipped($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,9 +33,10 @@ abstract class AbstractRedisCacheTest extends CacheTestCase
|
|||||||
if (!\extension_loaded('redis')) {
|
if (!\extension_loaded('redis')) {
|
||||||
self::markTestSkipped('Extension redis required.');
|
self::markTestSkipped('Extension redis required.');
|
||||||
}
|
}
|
||||||
if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) {
|
try {
|
||||||
$e = error_get_last();
|
(new \Redis())->connect(getenv('REDIS_HOST'));
|
||||||
self::markTestSkipped($e['message']);
|
} catch (\Exception $e) {
|
||||||
|
self::markTestSkipped($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,9 +23,10 @@ class RedisArrayStoreTest extends AbstractRedisStoreTest
|
|||||||
if (!class_exists('RedisArray')) {
|
if (!class_exists('RedisArray')) {
|
||||||
self::markTestSkipped('The RedisArray class is required.');
|
self::markTestSkipped('The RedisArray class is required.');
|
||||||
}
|
}
|
||||||
if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) {
|
try {
|
||||||
$e = error_get_last();
|
(new \Redis())->connect(getenv('REDIS_HOST'));
|
||||||
self::markTestSkipped($e['message']);
|
} catch (\Exception $e) {
|
||||||
|
self::markTestSkipped($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,9 +20,10 @@ class RedisStoreTest extends AbstractRedisStoreTest
|
|||||||
{
|
{
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) {
|
try {
|
||||||
$e = error_get_last();
|
(new \Redis())->connect(getenv('REDIS_HOST'));
|
||||||
self::markTestSkipped($e['message']);
|
} catch (\Exception $e) {
|
||||||
|
self::markTestSkipped($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user