mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-09 14:46:46 +02:00
Fixes 5.3 compatibility in test cases
This commit is contained in:
@@ -101,21 +101,20 @@ class RedisHandlerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$redis = $this->getMock('Predis\Client', array('transaction'));
|
$redis = $this->getMock('Predis\Client', array('transaction'));
|
||||||
|
|
||||||
|
$redisTransaction = $this->getMock('Predis\Client', array('lpush', 'ltrim'));
|
||||||
|
|
||||||
|
$redisTransaction->expects($this->once())
|
||||||
|
->method('lpush')
|
||||||
|
->will($this->returnSelf());
|
||||||
|
|
||||||
|
$redisTransaction->expects($this->once())
|
||||||
|
->method('ltrim')
|
||||||
|
->will($this->returnSelf());
|
||||||
|
|
||||||
// Redis uses multi
|
// Redis uses multi
|
||||||
$redis->expects($this->once())
|
$redis->expects($this->once())
|
||||||
->method('transaction')
|
->method('transaction')
|
||||||
->will($this->returnCallback(function($cb){
|
->will($this->returnCallback(function($cb) use ($redisTransaction){
|
||||||
|
|
||||||
$redisTransaction = $this->getMock('Predis\Client', array('lpush', 'ltrim'));
|
|
||||||
|
|
||||||
$redisTransaction->expects($this->once())
|
|
||||||
->method('lpush')
|
|
||||||
->will($this->returnSelf());
|
|
||||||
|
|
||||||
$redisTransaction->expects($this->once())
|
|
||||||
->method('ltrim')
|
|
||||||
->will($this->returnSelf());
|
|
||||||
|
|
||||||
$cb($redisTransaction);
|
$cb($redisTransaction);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user