Repository navigation
Tests: Make data providers in tests/phpunit/tests/rest-api/wpRestUrlDetailsController/ public and static - #15104
Conversation
…etailsController/ public and static 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:
|
|
This change to |
|
Closing in favor of #14907 which covers the full |
Description
Per Trac #66211 and committer feedback (Comment 109), this PR updates data providers in the entire
tests/phpunit/tests/rest-api/wpRestUrlDetailsController/directory to bepublic static.PHPUnit data providers that do not rely on test state or
$thisshould be declared aspublic staticto optimize test execution performance and comply with modern PHPUnit standards.Data providers updated in
tests/phpunit/tests/rest-api/wpRestUrlDetailsController/parsing.php:data_get_title()->public static functiondata_get_icon()->public static functiondata_get_description()->public static functiondata_get_image()->public static functionTesting Instructions
vendor/bin/phpunit tests/phpunit/tests/rest-api/wpRestUrlDetailsController/parsing.php-> PASS (80 tests, 80 assertions).vendor/bin/phpcs tests/phpunit/tests/rest-api/wpRestUrlDetailsController/-> PASS (0 errors, 0 warnings).Trac ticket: https://core.trac.wordpress.org/ticket/66211
Use of AI Tools
tests/phpunit/tests/rest-api/wpRestUrlDetailsController/directory, converted data providers topublic static, and verified via PHPUnit/PHPCS. All changes inspected and verified locally before submission.