Skip to content

Commit

Permalink
tests: Rename and abstractify custom TestCase base classes (#41935)
Browse files Browse the repository at this point in the history
PHPUnit 10+ requires that test class names match the filename, PSR-4
style. We've written a PHPUnit sniff to help find mismatches, but to
work properly it needs any custom TestCase base classes to be abstract
and have names ending in "TestCase" or "TestBase".

This PR adds `abstract` where necessary and renames classes where
necessary.

In a few places this has already caused other existing PHPUnit rules to
start fixing things. 😀

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

Upstream-Ref: Automattic/jetpack@18072cc
  • Loading branch information
anomiex authored and matticbot committed Feb 24, 2025
1 parent 78f5a26 commit 824d809
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "da41451c1401be76130cea3e326bef27b8ae9ceb"
"reference": "e3566754d27e5a0421fe1d9a75687b917ce3ae31"
},
"require": {
"php": ">=7.2"
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'automattic/jetpack-device-detection' => array(
'pretty_version' => '3.0.0',
'version' => '3.0.0.0',
'reference' => 'da41451c1401be76130cea3e326bef27b8ae9ceb',
'reference' => 'e3566754d27e5a0421fe1d9a75687b917ce3ae31',
'type' => 'jetpack-library',
'install_path' => __DIR__ . '/../automattic/jetpack-device-detection',
'aliases' => array(),
Expand Down

0 comments on commit 824d809

Please sign in to comment.