Repository navigation
Tests: Make group argument syntax data provider in groupFilters.php public and static - #15734
fozlerabbi48 wants to merge 1 commit into
Conversation
Declares `data_group_argument_syntax()` in `tests/phpunit/tests/phpunit/groupFilters.php` as `public static` for modern PHPUnit compatibility. See #66211.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change making the group-argument data provider static.
No open issues 🎉
What changed in this PR
Updates the group-filter test data provider for modern PHPUnit compatibility. The provider uses a fixed dataset and requires no instance state.
Changes:
- Makes
data_group_argument_syntax()static while retaining its public visibility and existing dataset.
| File | Description |
|---|---|
tests/phpunit/tests/phpunit/groupFilters.php |
Declares the group-argument syntax data provider public static. |
Review effort: Balanced
lancewillett
left a comment
There was a problem hiding this comment.
Thanks @fozlerabbi48. The provider is plain data, so adding static is all it needs. The tests pass in single site and multisite, with the same counts as trunk.
I'll land this with other #66211 data providers in one commit, as described in https://core.trac.wordpress.org/ticket/66211#comment:109.
AI review · claude-opus-5-5
|
PR #15734 landed in https://core.trac.wordpress.org/changeset/65313 |
Update the template, theme, view configuration, Ajax time format and PHPUnit group filter test providers for newer PHPUnit versions. Two providers used `$this`: the late-printed styles provider now uses static closures with `self::assert*()`, and the default themes list is now a static property. Developed in: WordPress/wordpress-develop#15730, WordPress/wordpress-develop#15731, WordPress/wordpress-develop#15732, WordPress/wordpress-develop#15733, WordPress/wordpress-develop#15734, WordPress/wordpress-develop#15442, WordPress/wordpress-develop#15438 Props fozlerabbi48, devmuhib. See #66211. Built from https://develop.svn.wordpress.org/trunk@65313 git-svn-id: http://core.svn.wordpress.org/trunk@64453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update the template, theme, view configuration, Ajax time format and PHPUnit group filter test providers for newer PHPUnit versions. Two providers used `$this`: the late-printed styles provider now uses static closures with `self::assert*()`, and the default themes list is now a static property. Developed in: WordPress#15730, WordPress#15731, WordPress#15732, WordPress#15733, WordPress#15734, WordPress#15442, WordPress#15438 Props fozlerabbi48, devmuhib. See #66211. git-svn-id: https://develop.svn.wordpress.org/trunk@65313 602fd350-edb4-49c9-b593-d223f7449a82
Update the template, theme, view configuration, Ajax time format and PHPUnit group filter test providers for newer PHPUnit versions. Two providers used `$this`: the late-printed styles provider now uses static closures with `self::assert*()`, and the default themes list is now a static property. Developed in: WordPress#15730, WordPress#15731, WordPress#15732, WordPress#15733, WordPress#15734, WordPress#15442, WordPress#15438 Props fozlerabbi48, devmuhib. See #66211. git-svn-id: https://develop.svn.wordpress.org/trunk@65313 602fd350-edb4-49c9-b593-d223f7449a82
Trac ticket: https://core.trac.wordpress.org/ticket/66211
Description
Declares
Tests_PHPUnit_GroupFilters::data_group_argument_syntax()intests/phpunit/tests/phpunit/groupFilters.phpaspublic staticfor modern PHPUnit compatibility.The data provider returns a static dataset and does not rely on instance state.
Testing Instructions
npm run test:php -- --filter Tests_PHPUnit_GroupFiltersnpm run test:php -- --filter Tests_PHPUnit_GroupFilters -c tests/phpunit/multisite.xml