Skip to content

Instantly share code, notes, and snippets.

@dgafka
Last active December 17, 2022 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgafka/744f9c41926b9f0b377be2b8c2c7eec7 to your computer and use it in GitHub Desktop.
Save dgafka/744f9c41926b9f0b377be2b8c2c7eec7 to your computer and use it in GitHub Desktop.
testing-message-driven-architecture-in-php-05.php
<?php
$ecotoneTestSupport = EcotoneLite::bootstrapForTesting(
[OrderService::class, OrderNotifier::class, ChannelConfiguration::class],
$dependencyContainer, // our dependency container
);
$ecotoneTestSupport->getCommandBus()->send(PlaceOrder::create($orderId));
$ecotoneTestSupport->run("notifications", PollingMetadata::create("notifications")->withTestingSetup(1, 5000, true));
Assert::assertEquals(1, $ecotoneTestSupport->sendQueryWithRouting("notificationService.getSentNotificationsCount"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment