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);