Skip to content

chore(test): Add functional tests listener#14

Merged
gilles-g merged 7 commits intoSpiriitLabs:mainfrom
gilles-g:add-functional-tests-listener
Mar 9, 2026
Merged

chore(test): Add functional tests listener#14
gilles-g merged 7 commits intoSpiriitLabs:mainfrom
gilles-g:add-functional-tests-listener

Conversation

@gilles-g
Copy link
Copy Markdown
Contributor

@gilles-g gilles-g commented Mar 9, 2026

No description provided.

Copilot AI and others added 7 commits March 3, 2026 17:06
- 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>
@gilles-g gilles-g merged commit 7eaa8b3 into SpiriitLabs:main Mar 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants