Add Messenger functional tests (6.4)#55
Merged
TavoNiievez merged 4 commits intoJun 25, 2026
Merged
Conversation
Add a MessengerCest covering the new Messenger assertions from codeception/module-symfony: assertMessageCount, seeMessageDispatched, dontSeeMessageDispatched and grabDispatchedMessageClasses. Enable Symfony Messenger in the test app (symfony/messenger + a default synchronous bus) with a sample message, handler and dispatch route, and keep the Mailer synchronous (mailer.message_bus: false) so the existing MailerCest is unaffected.
Refresh codeception/module-symfony dev-main (7d9317f -> 7f0cd5d) so the Messenger steps are available; MessengerCest passes against the merged module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to Codeception/module-symfony#241 (adds
MessengerAssertionsTrait).What
Adds
tests/Functional/MessengerCest.phpexercising the new Messenger steps end-to-end:seeDispatchedMessageCount(int, ?bus)seeMessageDispatched(class, ?bus)/dontSeeMessageDispatched(class, ?bus)grabDispatchedMessageClasses(?bus)App changes
symfony/messengerand enables it with a single synchronous default bus (messenger.bus.default).SendWelcomeMessage, its handler, and a/dispatch-messagecontroller/route the Cest hits.mailer.message_bus: falseso enabling Messenger does not route Mailer through the bus (which would otherwise double-count messages and breakMailerCest).Same change as the 7.4 PR (#53); validated there with
MessengerCest5/5 andMailerCest/NotifierCestgreen.CI is red until the module PR merges
These steps live in
codeception/module-symfony(PR #241), which is not yet released. The app installs the module viadev-main, soFunctionalTesterdoes not exposeseeDispatchedMessageCount/seeMessageDispatched/dontSeeMessageDispatched/grabDispatchedMessageClassesyet — theCall to undefined method ...failures are expected pre-merge. Once #241 is merged tomain, refreshing the lock (composer update codeception/module-symfony) makes this branch green.