| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function testInvoke() |
||
| 28 | { |
||
| 29 | $queue = $this->prophesize(Queue::class); |
||
| 30 | $callable = $this->prophesize(ConsumerInterface::class); |
||
| 31 | $libMessage = $this->prophesize(\AMQPEnvelope::class); |
||
| 32 | $message = $this->prophesize(Message::class); |
||
| 33 | $messageMapper = $this->prophesize(MessageMapper::class); |
||
| 34 | |||
| 35 | $messageMapper->toMessage($libMessage->reveal()) |
||
| 36 | ->shouldBeCalled() |
||
| 37 | ->willReturn($message); |
||
| 38 | |||
| 39 | $callable->__invoke($message->reveal(), $queue->reveal()) |
||
| 40 | ->shouldBeCalled(); |
||
| 41 | |||
| 42 | $consumerCallback = new ConsumerCallback($callable->reveal(), $queue->reveal()); |
||
| 43 | $consumerCallback->setMessageMapper($messageMapper->reveal()); |
||
| 44 | |||
| 45 | $consumerCallback($libMessage->reveal()); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |