macpaw/behat-messenger-context
Behat context for Symfony Messenger that lets you assert messages were dispatched, handled, or routed to specific transports during your scenarios. Integrates with Behat's step definitions to give readable, behavior-driven coverage of async messaging flows in PHP applications.
Adopt when:
Look elsewhere when:
Bus::fake() and Queue::fake() in PHPUnit/Pest are the idiomatic path, and this package will not integrate. Do not let the "PHP package" framing obscure this—the new queue-reset step does not change it.For executives: This is a small, free (MIT) open-source helper that makes our automated tests able to check whether background messages—emails, webhooks, order events—are actually being sent and processed correctly. Its latest release adds automatic cleanup between test scenarios, which is the fix for the "tests pass locally, fail in CI" class of async test flakiness. It reduces the amount of custom test code we write and maintain, and lets us catch async failures before customers do. The cost is near zero; the risk is that it is a low-adoption library, so we should plan to own a copy if it stalls.
For engineering: It is a Behat context for Symfony Messenger—steps for asserting dispatch, transport routing, and consumption in acceptance tests, now with per-scenario queue reset so state does not bleed between scenarios. That saves us writing both the harness and the cleanup logic. Scope caveat stands: only relevant if we are on Symfony Messenger and Behat; on Laravel, Bus::fake()/Queue::fake() remain the answer. Given 17 stars and no dependents, evaluate it as a starting point, be prepared to vendor or fork, and pin the version in composer (3.1.0).
How can I help you explore Laravel packages today?