use Symfony\Component\Messenger\Middleware\StackInterface;
use Symfony\Component\Messenger\Stamp\BusNameStamp;
use Symfony\Component\Messenger\Stamp\DelayStamp;
use Symfony\Component\Messenger\Stamp\ReceivedStamp;
use Symfony\Component\Messenger\Tests\Fixtures\AnEnvelopeStamp;
use Symfony\Component\Messenger\Tests\Fixtures\DummyMessage;
class MessageBusTest extends TestCase
{ public function testItHasTheRightInterface() { $bus =
new MessageBus();
$this->
assertInstanceOf(MessageBusInterface::
class,
$bus);
} public function testItCallsMiddleware() { $message =
new DummyMessage('Hello'
);
$envelope =
new Envelope($message);
$firstMiddleware =
$this->
createMock(MiddlewareInterface::
class);
$firstMiddleware->
expects($this->
once())