Repository navigation
Tests: Make data providers in tests/phpunit/tests/block-supports/ public and static - #14398
rejaulalomkhan wants to merge 1 commit into
Conversation
…lic and static. Makes 44 data provider methods in tests/phpunit/tests/block-supports/ public static for PHPUnit 10+ 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. You can also manually ask me to refresh this list by adding the 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. |
lancewillett
left a comment
There was a problem hiding this comment.
The provider bodies are safe to call statically, with datasets and assertions unchanged. PHPCS and CI pass. The combined randomized runs exposed a typography failure (expected 28px, received a fluid clamp(...) value); I reproduced the identical single-site failure with all 12 provider PRs removed. That existing isolation issue does not block this conversion.
AI review · gpt-6
Declare the data providers in `tests/phpunit/tests/block-supports/` as `public static` for compatibility with newer PHPUnit versions. Preserve their datasets and assertions. Developed in: #14398 Props rejaulalomkhan. See #66211. git-svn-id: https://develop.svn.wordpress.org/trunk@64449 602fd350-edb4-49c9-b593-d223f7449a82
Declare the data providers in `tests/phpunit/tests/block-supports/` as `public static` for compatibility with newer PHPUnit versions. Preserve their datasets and assertions. Developed in: WordPress/wordpress-develop#14398 Props rejaulalomkhan. See #66211. Built from https://develop.svn.wordpress.org/trunk@64449 git-svn-id: http://core.svn.wordpress.org/trunk@63599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
PR #14398 landed in https://core.trac.wordpress.org/changeset/64449 |
Description
In PHPUnit 10+, data provider methods must be
publicandstatic. In preparation for upgrading the test suite to PHPUnit 10 and beyond, data provider methods in the WordPress Core test suite are being converted topublic static.This PR updates all data provider methods across
tests/phpunit/tests/block-supports/to bepublic static:public staticacross 17 test files.Trac ticket: https://core.trac.wordpress.org/ticket/66211
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests in the Core Handbook for more details.
Use of AI Tools
This refactoring was identified and verified using Antigravity with Claude 3.7 Sonnet. All unit tests were executed and verified locally with PHPUnit.