chore(test): Add functional tests listener#14
Merged
gilles-g merged 7 commits intoSpiriitLabs:mainfrom Mar 9, 2026
Merged
Conversation
- Add explicit kernel.event_listener tag to LoginListener service definition (the #[AsEventListener] attribute is not processed for bundle-registered services without autoconfiguration) - Add functional tests for listener registration as event listener - Add functional tests for service declarations (LoginService, handler, event dispatcher alias) - Add unit tests for LoginListener behavior Co-authored-by: gilles-g <377875+gilles-g@users.noreply.github.com>
- Add tests for AuthenticationLogRepositoryInterface resolution - Add tests for AuthenticationLogCreatorInterface resolution - Add tests for NotificationInterface (default MailerNotification and custom notification) - Add tests for handler receiving interface implementations - Add test for LoginListener method binding (onLogin) - Add test for messenger handler receiving LoginService - Add test for FetchUserInformation locate method injection - Add StubNotification implementing NotificationInterface - Add custom_notification test config Co-authored-by: gilles-g <377875+gilles-g@users.noreply.github.com>
Use public service container assertions instead of reflection to test FetchUserInformation locate method wiring. Co-authored-by: gilles-g <377875+gilles-g@users.noreply.github.com>
Co-authored-by: gilles-g <377875+gilles-g@users.noreply.github.com>
- Add coverage job to CI workflow that runs tests with Xdebug coverage and enforces 100% line coverage via clover XML analysis - Add unit tests for all uncovered classes: - AbstractAuthenticationLog (constructor, getters, location handling) - FetchUserInformation (fetch with/without locate method) - IpApiLocateMethod (success, non-200 status, failed status) - Geoip2LocateMethod (RuntimeException when library unavailable) - LocateValues::fromArray() - AuthenticationLogEvent (accessors) - AuthLoginMessageHandler::__invoke() - Fix bug in FetchUserInformation: $location = [] changed to null (was causing TypeError with ?LocateValues parameter) - Exclude Geoip2LocateMethod from coverage (optional geoip2 dependency) - Configure phpunit.xml.dist with coverage filter for src/ directory Co-authored-by: gilles-g <377875+gilles-g@users.noreply.github.com>
Add ContainerLintTest that boots the kernel with every configuration variant and instantiates every bundle service. This mirrors what `bin/console lint:container` does in a real Symfony project: it catches missing service declarations, broken references, wrong argument types, circular dependencies, and non-existent class references. Tests cover: minimal, location (ipApi/geoip2), messenger, and custom notification configs. Full dependency chain resolution is verified for LoginService, messenger handler, and location provider. 52 tests, 180 assertions — all passing. Co-authored-by: gilles-g <377875+gilles-g@users.noreply.github.com>
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.
No description provided.