diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-16 04:01:40 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-16 04:01:40 +0900 |
| commit | fdd60a0a66890e049fea3db5c619e64e67e225df (patch) | |
| tree | cc2e03ef55af196a9e50cc1882777283190730a3 /crates/shirabe/src/command/exec_command.rs | |
| parent | 3a388b98a9aa6a14b1c7f7dc909c109cf9837800 (diff) | |
| download | php-shirabe-fdd60a0a66890e049fea3db5c619e64e67e225df.tar.gz php-shirabe-fdd60a0a66890e049fea3db5c619e64e67e225df.tar.zst php-shirabe-fdd60a0a66890e049fea3db5c619e64e67e225df.zip | |
test(event-dispatcher): run PHPUnit-class listeners in the PHP worker
The listeners of five tests are methods of
`Composer\Test\EventDispatcher\EventDispatcherTest`, which the worker
could not load because the class extends `PHPUnit\Framework\TestCase` and
phpunit is not part of the Composer runtime bundle. An empty stand-in for
that base class is enough: a parent class only has to exist at declaration
time, and method bodies and type declarations resolve lazily. The upstream
file is then required into the worker unchanged, so the listener bodies and
their `__DIR__` stay what Composer ships. The two assertions those bodies
call are the only PHPUnit members the stand-in has to implement.
`remove_listener` now compares a handle for an object the worker really
holds instead of a hand-written one, and `create_composer_instance` wires
the collaborators the autoloader-rebuild path reaches for, as the PHP
helper does.
Two tests stay ignored for a different reason: `Platform::put_env` writes
only the Shirabe process environment, while the listeners read `getenv()`
inside the long-lived worker.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/exec_command.rs')
0 files changed, 0 insertions, 0 deletions
