Skip to content

[DOCS] Running PHPUnit tests using the Playground CLI#3487

Open
bgrgicak wants to merge 2 commits intotrunkfrom
add/cli-phpunit-docs
Open

[DOCS] Running PHPUnit tests using the Playground CLI#3487
bgrgicak wants to merge 2 commits intotrunkfrom
add/cli-phpunit-docs

Conversation

@bgrgicak
Copy link
Copy Markdown
Collaborator

@bgrgicak bgrgicak commented Apr 14, 2026

Motivation for the change, related issues

The Playground CLI's php subcommand makes it easy to run PHPUnit for plugins and themes without a local database, but there's no guide documenting this workflow.

Implementation details

  • Adds a new guide at packages/docs/site/docs/main/guides/phpunit-testing.md covering:
    • Basic usage with npx @wp-playground/cli@latest php
    • Examples for both plugins and themes
    • Choosing PHP and WordPress versions
  • Adds the guide to the sidebar in sidebars.js (between the programmatic CLI guide and the E2E testing guide)
  • Adds a link to the guide in the guides index page

Testing Instructions

  1. Run npm run dev:docs
  2. Navigate to the Guides section
  3. Confirm the "Running PHPUnit with the Playground CLI" guide appears in the sidebar and index
  4. Open the guide and verify all links work
  5. Review the guide content and test it

@bgrgicak bgrgicak requested review from a team, brandonpayton and Copilot April 14, 2026 08:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new documentation guide explaining how to run PHPUnit for WordPress plugins/themes using the Playground CLI, and wires it into the guides navigation.

Changes:

  • Adds a new “Running PHPUnit with the Playground CLI” guide.
  • Adds the guide to the Guides index page.
  • Adds the guide to the docs sidebar navigation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/docs/site/sidebars.js Adds the new PHPUnit guide to the sidebar list.
packages/docs/site/docs/main/guides/phpunit-testing.md New guide describing how to run PHPUnit via the Playground CLI (with version selection).
packages/docs/site/docs/main/guides/index.md Adds a new entry pointing to the PHPUnit guide.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/docs/site/docs/main/guides/phpunit-testing.md
Move the --auto-mount explanation closer to its first use and add
an explicit --mount example for users who prefer manual control.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bgrgicak bgrgicak requested a review from fellyph April 21, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants