mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-12 16:14:08 +02:00
Fix Redis test failures
This commit is contained in:
@@ -33,6 +33,10 @@ class RedisHandlerTest extends TestCase
|
|||||||
|
|
||||||
public function testConstructorShouldWorkWithRedis()
|
public function testConstructorShouldWorkWithRedis()
|
||||||
{
|
{
|
||||||
|
if (!class_exists('Redis')) {
|
||||||
|
$this->markTestSkipped('The redis ext is required to run this test');
|
||||||
|
}
|
||||||
|
|
||||||
$redis = $this->createMock('Redis');
|
$redis = $this->createMock('Redis');
|
||||||
$this->assertInstanceof('Monolog\Handler\RedisHandler', new RedisHandler($redis, 'key'));
|
$this->assertInstanceof('Monolog\Handler\RedisHandler', new RedisHandler($redis, 'key'));
|
||||||
}
|
}
|
||||||
@@ -55,6 +59,10 @@ class RedisHandlerTest extends TestCase
|
|||||||
|
|
||||||
public function testRedisHandle()
|
public function testRedisHandle()
|
||||||
{
|
{
|
||||||
|
if (!class_exists('Redis')) {
|
||||||
|
$this->markTestSkipped('The redis ext is required to run this test');
|
||||||
|
}
|
||||||
|
|
||||||
$redis = $this->createPartialMock('Redis', ['rpush']);
|
$redis = $this->createPartialMock('Redis', ['rpush']);
|
||||||
|
|
||||||
// Redis uses rPush
|
// Redis uses rPush
|
||||||
@@ -71,6 +79,10 @@ class RedisHandlerTest extends TestCase
|
|||||||
|
|
||||||
public function testRedisHandleCapped()
|
public function testRedisHandleCapped()
|
||||||
{
|
{
|
||||||
|
if (!class_exists('Redis')) {
|
||||||
|
$this->markTestSkipped('The redis ext is required to run this test');
|
||||||
|
}
|
||||||
|
|
||||||
$redis = $this->createPartialMock('Redis', ['multi', 'rpush', 'ltrim', 'exec']);
|
$redis = $this->createPartialMock('Redis', ['multi', 'rpush', 'ltrim', 'exec']);
|
||||||
|
|
||||||
// Redis uses multi
|
// Redis uses multi
|
||||||
|
Reference in New Issue
Block a user