diff --git a/composer.json b/composer.json index 0f19dd15..d050a2c8 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,6 @@ "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^1.4", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", diff --git a/tests/Monolog/Handler/RedisHandlerTest.php b/tests/Monolog/Handler/RedisHandlerTest.php index 479262cf..806919e6 100644 --- a/tests/Monolog/Handler/RedisHandlerTest.php +++ b/tests/Monolog/Handler/RedisHandlerTest.php @@ -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]); diff --git a/tests/Monolog/Handler/RedisPubSubHandlerTest.php b/tests/Monolog/Handler/RedisPubSubHandlerTest.php index 38ece0d2..1dea351f 100644 --- a/tests/Monolog/Handler/RedisPubSubHandlerTest.php +++ b/tests/Monolog/Handler/RedisPubSubHandlerTest.php @@ -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]);