-
-
Notifications
You must be signed in to change notification settings - Fork 19
Improve mutation tests (#135) #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
rekmixa
commented
Jan 24, 2026
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ❌ |
| Breaks BC? | ❌ |
| Fixed issues | #135 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #136 +/- ##
============================================
- Coverage 99.33% 99.33% -0.01%
Complexity 162 162
============================================
Files 11 11
Lines 452 451 -1
============================================
- Hits 449 448 -1
Misses 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
samdark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks 👍 . Please add a line for CHANGELOG for additional validation added. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Improves mutation testing robustness by adding/adjusting tests and tightening validation in the logging context provider.
Changes:
- Added validation to reject negative
$traceLevelinSystemContextProviderand updated related documentation. - Expanded PHPUnit coverage for invalid/unsupported log levels and trace collection expectations.
- Updated Infection configuration to ignore mutations involving
register_shutdown_function.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/ContextProvider/SystemContextProvider.php |
Adds constructor validation for non-negative trace level; strengthens closure typing in trace filtering. |
tests/ContextProvider/SystemContextProviderTest.php |
New tests covering invalid trace level and presence of expected context keys. |
tests/LoggerTest.php |
Adds tests for invalid log levels; makes trace line assertion resilient to line shifts; strengthens excluded-trace-path assertions. |
src/Logger.php |
Refactors deprecated validateLevel() to delegate to assertLevelIsValid() and adjusts docblock. |
infection.json.dist |
Configures Infection to globally ignore source containing register_shutdown_function. |
CHANGELOG.md |
Documents the trace level validation change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…n SystemContextProvider (yiisoft#135)