Skip to content

Commit

Permalink
phpunit: Rename package test classes for PHPUnit 11 compat (pt 2) (#4…
Browse files Browse the repository at this point in the history
…2128)

PHPUnit 10+ requires that test class names match the filename, PSR-4
style. This PR renames the test classes and files in packages to end in
`Test` or `_Test`, depending on whether the class names are following
WordPress's underscore-naming convention or are using CamelCase, and
removing redundant `WP_Test_` or `Test_` prefixes.

This also adds our standard Jetpack-Tests ruleset to
tests/.phpcs.dir.xml in the packages, and removes some redundant inline
phpcs:ignore or phpcs:disable directives.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/13637625724

Upstream-Ref: Automattic/jetpack@f1afaaa
  • Loading branch information
anomiex authored and matticbot committed Mar 3, 2025
1 parent 47e1c96 commit fafd8dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"automattic/jetpack-connection": "^6.7.0-alpha",
"automattic/jetpack-logo": "^3.0.2-alpha",
"automattic/jetpack-status": "^5.0.5-alpha",
"automattic/jetpack-sync": "^4.8.2"
"automattic/jetpack-sync": "^4.8.3-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
Expand Down

0 comments on commit fafd8dc

Please sign in to comment.