Extend PhpUnitTestDiscoveryTest to test also PHPUnit API

Created on 4 January 2025, 3 months ago

Problem/Motivation

In 🐛 Ensure run-tests.sh and PHPUnit CLI run with the same list of tests to be executed Active , we introduced a test checking equality between PHPUnit and TestDiscovery test discovery lists and fails if they differ.

We used a shell process to run the PHPUnit CLI for this purpose, and interpreted the output XML file.

PHPUnit also provides an API to retrieve the test list via PHP, avoiding the subprocess execution.

Using directly the API has a potential to eventually drop Drupal's own test discovery process.

Proposed resolution

For now, just add a check for the result of the API calls. Keep both CLI and API checks.

Dropping Drupal's TestDiscovery is left to a follow-up once we are confident we no longer need that.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

phpunit

Created by

🇮🇹Italy mondrake 🇮🇹

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024