1 | <?php |
||||
2 | |||||
3 | namespace OldSound\RabbitMqBundle\Tests\RabbitMq; |
||||
4 | |||||
5 | use OldSound\RabbitMqBundle\RabbitMq\RpcServer; |
||||
6 | use PhpAmqpLib\Message\AMQPMessage; |
||||
7 | use PHPUnit\Framework\TestCase; |
||||
8 | |||||
9 | class RpcServerTest extends TestCase |
||||
10 | { |
||||
11 | public function testProcessMessageWithCustomSerializer() |
||||
12 | { |
||||
13 | /** @var RpcServer $server */ |
||||
14 | $server = $this->getMockBuilder('\OldSound\RabbitMqBundle\RabbitMq\RpcServer') |
||||
0 ignored issues
–
show
|
|||||
15 | ->setMethods(['sendReply', 'maybeStopConsumer']) |
||||
16 | ->disableOriginalConstructor() |
||||
17 | ->getMock(); |
||||
18 | $message = $this->getMockBuilder('\PhpAmqpLib\Message\AMQPMessage') |
||||
0 ignored issues
–
show
The function
PHPUnit\Framework\MockOb...ckBuilder::setMethods() has been deprecated: https://github.com/sebastianbergmann/phpunit/pull/3687
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
19 | ->setMethods(['get']) |
||||
20 | ->getMock(); |
||||
21 | $message->setChannel( |
||||
22 | $this->getMockBuilder('\PhpAmqpLib\Channel\AMQPChannel') |
||||
0 ignored issues
–
show
The function
PHPUnit\Framework\MockOb...ckBuilder::setMethods() has been deprecated: https://github.com/sebastianbergmann/phpunit/pull/3687
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
23 | ->setMethods([])->setConstructorArgs([]) |
||||
24 | ->setMockClassName('') |
||||
25 | ->disableOriginalConstructor() |
||||
26 | ->getMock() |
||||
27 | ); |
||||
28 | $message->setDeliveryTag(0); |
||||
29 | $server->setCallback(function () { |
||||
30 | return 'message'; |
||||
31 | }); |
||||
32 | $serializer = $this->getMockBuilder('\Symfony\Component\Serializer\SerializerInterface') |
||||
0 ignored issues
–
show
The function
PHPUnit\Framework\MockOb...ckBuilder::setMethods() has been deprecated: https://github.com/sebastianbergmann/phpunit/pull/3687
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
33 | ->setMethods(['serialize', 'deserialize']) |
||||
34 | ->getMock(); |
||||
35 | $serializer->expects($this->once())->method('serialize')->with('message', 'json'); |
||||
36 | $server->setSerializer(function ($data) use ($serializer) { |
||||
37 | $serializer->serialize($data, 'json'); |
||||
38 | }); |
||||
39 | $server->processMessage($message); |
||||
40 | } |
||||
41 | } |
||||
42 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.