1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-13 00:24:10 +02:00

Drop prophecy usage

This commit is contained in:
Jordi Boggiano
2022-05-08 23:13:26 +02:00
parent 8a356498d9
commit acc142c2b7
3 changed files with 8 additions and 7 deletions

View File

@@ -35,9 +35,10 @@ class RedisHandlerTest extends TestCase
public function testPredisHandle()
{
$redis = $this->prophesize('Predis\Client');
$redis->rpush('key', 'test')->shouldBeCalled();
$redis = $redis->reveal();
$redis = $this->getMockBuilder('Predis\Client')->getMock();
$redis->expects($this->atLeastOnce())
->method('__call')
->with(self::equalTo('rpush'), self::equalTo(['key', 'test']));
$record = $this->getRecord(Level::Warning, 'test', ['data' => new \stdClass, 'foo' => 34]);

View File

@@ -37,9 +37,10 @@ class RedisPubSubHandlerTest extends TestCase
public function testPredisHandle()
{
$redis = $this->prophesize('Predis\Client');
$redis->publish('key', 'test')->shouldBeCalled();
$redis = $redis->reveal();
$redis = $this->getMockBuilder('Predis\Client')->getMock();
$redis->expects($this->atLeastOnce())
->method('__call')
->with(self::equalTo('publish'), self::equalTo(['key', 'test']));
$record = $this->getRecord(Level::Warning, 'test', ['data' => new \stdClass(), 'foo' => 34]);