Skip to content

Add focused datagrid test coverage#1286

Merged
f3l1x merged 2 commits into
contributte:masterfrom
ohmyfelix:chore/improve-test-coverage
May 27, 2026
Merged

Add focused datagrid test coverage#1286
f3l1x merged 2 commits into
contributte:masterfrom
ohmyfelix:chore/improve-test-coverage

Conversation

@ohmyfelix

@ohmyfelix ohmyfelix commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds focused tests for previously thinly covered datagrid helpers and action configuration paths, plus small PHPStan compatibility fixes for the current dependency set used in CI.

Motivation

Improve regression coverage around pure utility behavior and user-facing action APIs without relying on brittle database or browser setup, while keeping CI green with freshly resolved dependencies.

Changes

  • Add tests for array and date-time helper edge cases.
  • Add MultiAction and group-action unit coverage.
  • Extend action and status confirmation coverage.
  • Extend SearchParamsBuilder range and empty-query edge coverage.
  • Tighten PHPStan-compatible source types around form/control handling.
  • Rebase onto current master and keep the branch to two logical commits.

Testing

  • vendor/bin/tester -s -p php --colors 1 -C tests/Cases

|_ / )( / / __)| _ )
|
| _
/
) || ___ ||\ v2.6.0

�[?25lPHP 8.5.3 (cli) | php | 8 threads

...............................s.

-- Skipped: DataSources/NextrasDataSourceTest.phpt dataprovider=mysql|/home/coder/ohmyfelix/source/contributte/datagrid/tests/Cases/DataSources/nextrasDatasource.ini
MySQL is not running

�[1m�[37m�[42mOK (33 tests, 1 skipped, 0.6 seconds)�[0m
�[?25h

  • vendor/bin/phpcs --standard=ruleset.xml --extensions=php,phpt --tab-width=4 --ignore=tests/tmp --colors -nsp src tests
    ............................................................ 60 / 141 (43%)
    ............................................................ 120 / 141 (85%)
    ..................... 141 / 141 (100%)

Time: 3.82 secs; Memory: 30MB

  • vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=512M

[OK] No errors

  • Latest CI passes

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.77%. Comparing base (5758cba) to head (066597a).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/GroupAction/GroupActionCollection.php 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1286      +/-   ##
==========================================
+ Coverage   47.57%   48.77%   +1.19%     
==========================================
  Files          53       61       +8     
  Lines        2726     2901     +175     
==========================================
+ Hits         1297     1415     +118     
- Misses       1429     1486      +57     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ohmyfelix ohmyfelix force-pushed the chore/improve-test-coverage branch from 08080cb to 066597a Compare May 27, 2026 20:10
@f3l1x f3l1x merged commit fe7954d into contributte:master May 27, 2026
10 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.

3 participants