You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PHPUnit project mode keeps Playground's pretty permalinks instead of core's plain test-install state #2628
In bootstrap-mode=project, the PHPUnit runtime sets WP_TESTS_SKIP_INSTALL=1 and reuses the site that Playground installed (packages/runtime-playground/src/phpunit-command-handlers.ts, the project-mode branch). Playground's installer sets permalink_structure to /%year%/%monthnum%/%day%/%postname%/ (playground/wordpress/src/boot.ts, installWordPress). Core's test install (tests/phpunit/includes/install.php) deletes permalink_structure, so every other WordPress test environment starts with plain permalinks. WP_UnitTestCase resets permalinks only when WP_RUN_CORE_TESTS is set, so a plugin suite keeps the pretty structure.
Effect
Plugin tests that build URLs through add_query_arg() and compare them with core output fail only under Codebox. Example from a Homeboy WordPress-extension run of Jetpack's wpcomsh suite on unmodified trunk (--setting database_type=mysql):
✘ Redirects an old author slug with data set "paged"
-'http://127.0.0.1:61571/author/newslug/?paged=2'
+'http://127.0.0.1:61571/author/newslug/page/2/'
The same test passes in Jetpack CI, which runs core's installer against MariaDB.
Desired
In project mode, the database starts in the same state core's test install leaves it: permalink_structure is empty and rewrite rules are flushed (or install.php runs in-process, as managed mode does). Test: a project-mode PHPUnit run asserts get_option( 'permalink_structure' ) === '' before the first test.
AI disclosure: Claude Opus (Pi, via Roadie) traced this from the run artifact and the Codebox and Playground source, and wrote this issue.
Activity
chubes4 commentedon Dec 5, 2026
Fixed by #2634.