test: pin request factory wiring and zero-boundary option values#52
Merged
Conversation
Mutation testing showed the constructor's setRequestFactory call could be removed (silently falling back to the parent's default factory) and the < 0 guards on cacheDuration/leeway could become <= 0 (rejecting the valid boundary value 0) without a failing test. Kills 3 escaped mutants. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tructor-boundaries # Conflicts: # CHANGELOG.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #52 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 71 71
===========================================
Files 1 1
Lines 185 185
===========================================
Hits 185 185
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Third of three scoped follow-ups to #49. Targets constructor wiring and option boundaries (3 escaped mutants).
Features Added
testConstructWiresJwtCollaboratorAsRequestFactory: thejwtcollaborator must become the provider's request factory — removing the wiring silently substituted the parent's default factorytestConstructZeroCacheDurationAndLeewayAccepted:0is a valid boundary for both options (cache nothing / tolerate no clock skew); the< 0guards could mutate to<= 0undetected — the textbook boundary mutantFiles Changed
tests/Security/OpenIdConfigurationProviderTest.php- two new testsCHANGELOG.md- Unreleased bulletTest Plan
vendor/bin/phpunit— 99 tests, 162 assertions, greenvendor/bin/infection— kills its 3 targeted mutants (57 → 54 on this branch alone)Notes
Combined with #50 and #51 this leaves 13 escaped mutants, all equivalent or contrived (JSON depth-512 literals, random-string default lengths, casts only observable on corrupted cache, an unreachable catch-union member). A final PR will ratchet
minCoveredMsiaccordingly.🤖 Generated with Claude Code