test: add notification channel routing tests (framework#1535) - #142
Merged
Conversation
hwbrzzl
reviewed
Aug 16, 2026
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.
Summary
"mail"/"database"literals to thenotification.ChannelMail/notification.ChannelDatabaseconstants.RouteNotificationForDatabase) to theUsermodel that takes precedence over the genericRouteNotificationForfallback for the database channel.NotificationDatabaseEmptyRoute/NotificationMailEmptyRoute), and per-connection database delivery.Why
Framework#1535 introduced typed notification routing: a
DatabaseRoutablenotifiable can declareRouteNotificationForDatabase(), which wins over the genericRouteNotificationForfallback, and delivery fails with distinct empty-route errors when no route resolves. This branch upgrades the example to the new framework build, migrates example notifications to the exported channel constants, and implements the typed route on theUsermodel so the example stays a faithful reference for the new API.The new tests pin down the routing semantics: the typed route is preferred when it returns a value, an empty typed route falls back to
RouteNotificationFor, and both empty means delivery fails with the framework's empty-route error — so example behavior matches the framework contract exactly.