From d6b59f1fa9771f4349e512de90b58df2c15bdf18 Mon Sep 17 00:00:00 2001 From: Iain Mckay Date: Thu, 28 Sep 2017 14:46:33 +0200 Subject: [PATCH] AsyncMessage now implements the Message interface --- src/Async/AsyncMessage.php | 4 +++- tests/Container/BusFactoriesTest.php | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Async/AsyncMessage.php b/src/Async/AsyncMessage.php index 64ff33d..6a99d15 100644 --- a/src/Async/AsyncMessage.php +++ b/src/Async/AsyncMessage.php @@ -12,9 +12,11 @@ namespace Prooph\ServiceBus\Async; +use Prooph\Common\Messaging\Message; + /** * This interface is used to mark messages that are to be send via an async MessageProducer */ -interface AsyncMessage +interface AsyncMessage extends Message { } diff --git a/tests/Container/BusFactoriesTest.php b/tests/Container/BusFactoriesTest.php index 75b49e0..9ae758f 100644 --- a/tests/Container/BusFactoriesTest.php +++ b/tests/Container/BusFactoriesTest.php @@ -285,8 +285,7 @@ public function it_decorates_router_with_async_switch_and_pulls_async_message_pr AbstractBusFactory $busFactory ): void { $container = $this->prophesize(ContainerInterface::class); - $message = $this->prophesize(Message::class); - $message->willImplement(AsyncMessage::class); + $message = $this->prophesize(AsyncMessage::class); $messageFactory = $this->prophesize(MessageFactory::class); $messageProducer = new NoopMessageProducer(); $container->get('noop_message_producer')->willReturn($messageProducer);