Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function testSend() |
||
19 | { |
||
20 | $serializer = SerializerBuilder::create()->build(); |
||
21 | $producer = $this->getMockBuilder(ProducerInterface::class)->getMock(); |
||
22 | $sendDriver = new RabbitMqSendDriver($serializer, $producer); |
||
23 | $command = $this->getMockBuilder(CommandInterface::class)->getMock(); |
||
24 | |||
25 | $producer->expects($this->once()) |
||
26 | ->method('publish') |
||
27 | ->with($serializer->serialize($command, 'json'), |
||
28 | get_class($command), |
||
29 | array( |
||
30 | 'application_headers' => array( |
||
31 | 'x-class-name' => array( |
||
32 | 'S', |
||
33 | get_class($command), |
||
34 | ), |
||
35 | ), |
||
36 | )) |
||
37 | ; |
||
38 | |||
39 | $sendDriver->send($command); |
||
40 | } |
||
41 | } |
||
42 |