diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-20 05:21:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-20 05:21:13 +0900 |
| commit | dd06753ca61b9ccb64ac80e92390ee57d8f4b413 (patch) | |
| tree | 8d176eda674ceab9040b1695210729e7afcec42c /crates/shirabe/src/event_dispatcher/event_dispatcher.rs | |
| parent | 087020525d364e1e5bb3d9b41d020704b068c59c (diff) | |
| download | php-shirabe-dd06753ca61b9ccb64ac80e92390ee57d8f4b413.tar.gz php-shirabe-dd06753ca61b9ccb64ac80e92390ee57d8f4b413.tar.zst php-shirabe-dd06753ca61b9ccb64ac80e92390ee57d8f4b413.zip | |
fix(event-dispatcher): un-ignore test_dispatcher_support_for_additional_args
The only missing seam was the PHP test's
ReflectionMethod(getPhpExecCommand) access; add the test-only
__get_php_exec_command wrapper and port the test on the existing
get_listeners override and process-executor mock infrastructure.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/event_dispatcher/event_dispatcher.rs')
| -rw-r--r-- | crates/shirabe/src/event_dispatcher/event_dispatcher.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/shirabe/src/event_dispatcher/event_dispatcher.rs b/crates/shirabe/src/event_dispatcher/event_dispatcher.rs index 49de9605..6deb130e 100644 --- a/crates/shirabe/src/event_dispatcher/event_dispatcher.rs +++ b/crates/shirabe/src/event_dispatcher/event_dispatcher.rs @@ -122,6 +122,12 @@ impl EventDispatcher { self.get_listeners_override = Some(GetListenersOverride(callback)); } + /// For testing only. Exposes the protected `getPhpExecCommand`, mirroring the PHP tests' + /// `new \ReflectionMethod($dispatcher, 'getPhpExecCommand')`. + pub fn __get_php_exec_command(&self) -> anyhow::Result<String> { + self.get_php_exec_command() + } + /// Set whether script handlers are active or not pub fn set_run_scripts(&mut self, run_scripts: bool) { self.run_scripts = run_scripts; |
