1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-04 04:07:39 +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

@@ -27,7 +27,6 @@
"mongodb/mongodb": "^1.8", "mongodb/mongodb": "^1.8",
"php-amqplib/php-amqplib": "~2.4 || ^3", "php-amqplib/php-amqplib": "~2.4 || ^3",
"php-console/php-console": "^3.1.3", "php-console/php-console": "^3.1.3",
"phpspec/prophecy": "^1.15",
"phpstan/phpstan": "^1.4", "phpstan/phpstan": "^1.4",
"phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-strict-rules": "^1.1", "phpstan/phpstan-strict-rules": "^1.1",

View File

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

View File

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