|
|
@@ -84,8 +84,13 @@ class AmqpHandlerTest extends TestCase
|
|
|
|
|
|
$messages = [];
|
|
|
|
|
|
+ $methodsToMock = ['basic_publish'];
|
|
|
+ if (method_exists('PhpAmqpLib\Channel\AMQPChannel', '__destruct')) {
|
|
|
+ $methodsToMock[] = '__destruct';
|
|
|
+ }
|
|
|
+
|
|
|
$exchange = $this->getMockBuilder('PhpAmqpLib\Channel\AMQPChannel')
|
|
|
- ->onlyMethods(['basic_publish', '__destruct'])
|
|
|
+ ->onlyMethods($methodsToMock)
|
|
|
->disableOriginalConstructor()
|
|
|
->getMock();
|
|
|
|