Skip to content

Implicit PHPUnit profiles reject configless plugin suites #1943

Description

@chubes4

Problem

PR #1940 made wordpress.phpunit fail when neither an implicit phpunit.xml.dist nor adjacent phpunit.xml exists. The canonical recipe builder always supplies the default phpunit.xml.dist path but does not materialize that file. Plugins with WP_UnitTestCase files and no repository-owned XML therefore fail before test discovery.

Downstream tracker and reproduction: Extra-Chill/homeboy-extensions#2343
Failing SSI run: https://github.com/Automattic/static-site-importer/actions/runs/29859018600
Regression commit: a9edf319d8ca79013f85ff87b94c85b27e542c67

Expected contract

  • Explicit phpunit-xml paths remain fail-closed when missing or malformed.
  • An implicit default profile falls back from phpunit.xml.dist to adjacent phpunit.xml when present.
  • When neither implicit file exists, discovery uses the managed default test root and matchers rather than failing before discovery.
  • Missing configured test directories/files and generic zero-test discovery remain failures.

Acceptance criteria

  1. Add deterministic coverage for a plugin with WP_UnitTestCase files and no PHPUnit XML.
  2. Preserve malformed, explicit-missing, and configured-path failure coverage.
  3. Re-run Static Site Importer PHP 8.1-8.4 successfully through Homeboy.

AI assistance

  • AI assistance: Yes
  • Tool: OpenAI GPT-5.6 Sol with OpenCode
  • Used for: cross-run diagnosis, root-cause isolation, implementation, and verification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions