Commit 47e1c96
phpunit: Rename package test classes for PHPUnit 11 compat (pt 1) (#42120)
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.
Of note, changed test order in the Connection package broke a test.
Adding some setup/teardown code to clear the affected singleton fixed
it.
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/13637614579
Upstream-Ref: Automattic/jetpack@327f25f1 parent 7c7ddfc commit 47e1c96
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments