mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Fix of Predis\Client mock creation
Predis\Client uses __call method to process commands (rPush, lTrim), getPartialMock() doesn't work with addMethods()
This commit is contained in:
@@ -109,7 +109,10 @@ class RedisHandlerTest extends TestCase
|
||||
{
|
||||
$redis = $this->createPartialMock('Predis\Client', ['transaction']);
|
||||
|
||||
$redisTransaction = $this->createPartialMock('Predis\Client', ['rPush', 'lTrim']);
|
||||
$redisTransaction = $this->getMockBuilder('Predis\Client')
|
||||
->disableOriginalConstructor()
|
||||
->addMethods(['rPush', 'lTrim'])
|
||||
->getMock();
|
||||
|
||||
$redisTransaction->expects($this->once())
|
||||
->method('rPush')
|
||||
|
Reference in New Issue
Block a user