Skip to content

Commit 47e1c96

Browse files
anomiexmatticbot
authored andcommitted
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@327f25f
1 parent 7c7ddfc commit 47e1c96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"license": "GPL-2.0-or-later",
66
"require": {
77
"php": ">=7.2",
8-
"automattic/jetpack-blocks": "^3.0.3",
8+
"automattic/jetpack-blocks": "^3.0.4-alpha",
99
"automattic/jetpack-assets": "^4.0.9-alpha",
1010
"automattic/jetpack-connection": "^6.7.0-alpha",
11-
"automattic/jetpack-logo": "^3.0.1",
11+
"automattic/jetpack-logo": "^3.0.2-alpha",
1212
"automattic/jetpack-status": "^5.0.5-alpha",
1313
"automattic/jetpack-sync": "^4.8.2"
1414
},

0 commit comments

Comments
 (0)