Set up the PHPUnit test harness for a WordPress plugin or theme, the WP way. Covers wp scaffold plugin-tests / wp scaffold theme-tests and the files it generates (phpunit.xml.dist, bin/install-wp-tests.sh, tests/bootstrap.php, tests/test-sample.php, .phpcs.xml.dist, a CI workflow), installing the WordPress test suite with install-wp-tests.sh (curl-based, no SVN), the test database, yoast/phpunit-polyfills, the critical fact that the WP core test suite is capped at PHPUnit 9.x, composer require-dev / scripts wiring, a GitHub Actions PHP x WP matrix with shivammathur/setup-php, and the modern wp-env / wp-phpunit/wp-phpunit alternatives. Use when adding a test harness, wiring CI, or debugging install-wp-tests / bootstrap / PHPUnit-version problems. For writing the tests themselves see wp-phpunit-writing-tests.
$npx -y skills add lonsdale201/wp-agent-skills --skill wp-phpunit-test-setupInstalls into the current project.
Run `npx skills use "https://github.com/lonsdale201/wp-agent-skills" --skill "lonsdale201/wp-agent-skills/wp-phpunit-test-setup"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/lonsdale201/wp-agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/lonsdale201/wp-agent-skills"` and select the relevant skills, then follow their instructions.