Skip to content

Add unit tests for grid widget classes#20788

Open
WarLikeLaux wants to merge 3 commits intoyiisoft:masterfrom
WarLikeLaux:add-grid-tests
Open

Add unit tests for grid widget classes#20788
WarLikeLaux wants to merge 3 commits intoyiisoft:masterfrom
WarLikeLaux:add-grid-tests

Conversation

@WarLikeLaux
Copy link
Contributor

@WarLikeLaux WarLikeLaux commented Mar 8, 2026

Q A
Is bugfix?
New feature?
Tests added? ✔️
Breaks BC?
Fixed issues

What does this PR do?

Adds unit tests for grid widget classes to reach 100% line coverage across all 8 files. Also fixes formatter fallback tests to respect mocked intl status in CI.

Coverage

File Tests Lines MSI
ActionColumn.php 2 → 6 42/47 (89%) → 47/47 (100%) -
CheckboxColumn.php 3 → 6 31/34 (91%) → 34/34 (100%) -
Column.php 0 → 7 8/14 (57%) → 14/14 (100%) -
DataColumn.php 8 → 19 42/62 (68%) → 62/62 (100%) -
GridView.php 5 → 21 112/141 (79%) → 141/141 (100%) -
RadioButtonColumn.php 4 → 5 11/12 (92%) → 12/12 (100%) -
SerialColumn.php 6 → 6 4/4 (100%) → 4/4 (100%) -
Total 30 → 92 250/314 (80%) → 314/314 (100%) 91%

Changelog not required, because no source files changed.

@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.83%. Comparing base (068c5a4) to head (612b9e8).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20788      +/-   ##
============================================
+ Coverage     78.62%   78.83%   +0.21%     
  Complexity    11566    11566              
============================================
  Files           376      376              
  Lines         30748    30748              
============================================
+ Hits          24176    24241      +65     
+ Misses         6572     6507      -65     

☔ 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 marked this pull request as draft March 8, 2026 09:05
@WarLikeLaux WarLikeLaux marked this pull request as ready for review March 8, 2026 12:43
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