Problem
The generated wordpress.phpunit workload directly instantiates PHPUnit\Framework\TestSuite. PHPUnit versions where TestSuite::__construct() is private crash during load_tests before any component tests execute.
Reproduction
A Homeboy release test for Data Machine Events using WP Codebox 0.12.14:
STAGE_FATAL:load_tests:Uncaught Error: Call to private PHPUnit\Framework\TestSuite::__construct() from global scope in /internal/eval.php:1096
The runtime successfully installs WordPress, activates dependencies, and discovers 46 test files. The failure is in generated WP Codebox harness code. Current origin/main still directly constructs TestSuite in both plugin and core harness generators.
Downstream tracking: Extra-Chill/homeboy-extensions#2258.
Expected
Construct suites through a PHPUnit-version-compatible public API so discovered tests reach execution across supported old and new PHPUnit versions.
Acceptance criteria
- Replace direct
TestSuite construction in every generated PHPUnit harness path.
- Preserve compatibility with supported older PHPUnit versions.
- Add regression coverage for a PHPUnit version with a private constructor.
- Preserve stage-specific infrastructure failure reporting.
- Verify discovered
*Test.php files reach execution.
Problem
The generated
wordpress.phpunitworkload directly instantiatesPHPUnit\Framework\TestSuite. PHPUnit versions whereTestSuite::__construct()is private crash duringload_testsbefore any component tests execute.Reproduction
A Homeboy release test for Data Machine Events using WP Codebox 0.12.14:
The runtime successfully installs WordPress, activates dependencies, and discovers 46 test files. The failure is in generated WP Codebox harness code. Current
origin/mainstill directly constructsTestSuitein both plugin and core harness generators.Downstream tracking: Extra-Chill/homeboy-extensions#2258.
Expected
Construct suites through a PHPUnit-version-compatible public API so discovered tests reach execution across supported old and new PHPUnit versions.
Acceptance criteria
TestSuiteconstruction in every generated PHPUnit harness path.*Test.phpfiles reach execution.