Skip to content

Add unit tests for web utilities#20771

Open
WarLikeLaux wants to merge 1 commit intoyiisoft:masterfrom
WarLikeLaux:test-web-utilities
Open

Add unit tests for web utilities#20771
WarLikeLaux wants to merge 1 commit intoyiisoft:masterfrom
WarLikeLaux:test-web-utilities

Conversation

@WarLikeLaux
Copy link
Contributor

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues

What does this PR do?

Adds unit tests for 4 web utility classes that had no dedicated test coverage: Cookie, JsonParser, SessionIterator, JsExpression.

Before

Tests: 0, Assertions: 0
Methods: 0% (0/10), Lines: 0% (0/20)
MSI: 0% (0/32 mutants killed)

After

Tests: 37, Assertions: 62
Methods: 100% (10/10), Lines: 100% (20/20)
MSI: 97% (28/32 mutants killed, 3 timed out, 1 equivalent)

Escaped mutants (all equivalent)

JsExpression.php (1): MethodCallRemoval - L38, parent::__construct($config) removal with empty config is a no-op.


Changelog not required, because no source files changed.

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.65%. Comparing base (379b296) to head (1d83278).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20771      +/-   ##
============================================
+ Coverage     78.56%   78.65%   +0.08%     
  Complexity    11568    11568              
============================================
  Files           376      376              
  Lines         30750    30750              
============================================
+ Hits          24160    24185      +25     
+ Misses         6590     6565      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WarLikeLaux WarLikeLaux changed the title Add unit tests for Cookie, JsonParser, SessionIterator, `JsExpr… Add unit tests for web utilities Mar 4, 2026
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.

1 participant