diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 05:09:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 05:09:56 +0900 |
| commit | 25f96cab45f5da4fba2ef0486a0b0bc8f7ca87b0 (patch) | |
| tree | 0974de4f5e7a19415f2bcda9adc34cb95263b2e9 /crates/shirabe/tests/event_dispatcher | |
| parent | b07f3a9f51d7ce5ea8ee4dc45da7fe9a55b7f1d4 (diff) | |
| download | php-shirabe-25f96cab45f5da4fba2ef0486a0b0bc8f7ca87b0.tar.gz php-shirabe-25f96cab45f5da4fba2ef0486a0b0bc8f7ca87b0.tar.zst php-shirabe-25f96cab45f5da4fba2ef0486a0b0bc8f7ca87b0.zip | |
test: port downloader/installer/io/json/event-dispatcher/functional stubs
All ignored: these mock IO/HttpDownloader (curl)/ProcessExecutor/installers,
use ZipArchive/JsonManipulator todo!()s, need Symfony console or schema
validation, reflect into ClassLoader, or run end-to-end install/functional
fixtures. Wires up the event_dispatcher test target.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/event_dispatcher')
| -rw-r--r-- | crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs | 29 | ||||
| -rw-r--r-- | crates/shirabe/tests/event_dispatcher/main.rs | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs index 1194da4..86e33f2 100644 --- a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs +++ b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs @@ -1 +1,30 @@ //! ref: composer/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php + +// These build an EventDispatcher with a mocked Composer/IO/ProcessExecutor and run script +// listeners (executing CLI/PHP callbacks); mocking and the script-execution machinery are +// not available here. +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_listener_exceptions_are_caught); +stub!(test_dispatcher_can_execute_single_command_line_script); +stub!(test_dispatcher_pass_dev_mode_to_autoload_generator_for_script_events); +stub!(test_dispatcher_remove_listener); +stub!(test_dispatcher_can_execute_cli_and_php_in_same_event_script_stack); +stub!(test_dispatcher_can_put_env); +stub!(test_dispatcher_appends_dir_bin_on_path_for_every_listener); +stub!(test_dispatcher_support_for_additional_args); +stub!(test_dispatcher_can_execute_composer_script_groups); +stub!(test_recursion_in_scripts_names); +stub!(test_dispatcher_detect_infinite_recursion); +stub!(test_dispatcher_outputs_command); +stub!(test_dispatcher_outputs_error_on_failed_command); +stub!(test_dispatcher_installer_events); +stub!(test_dispatcher_doesnt_return_skipped_scripts); diff --git a/crates/shirabe/tests/event_dispatcher/main.rs b/crates/shirabe/tests/event_dispatcher/main.rs new file mode 100644 index 0000000..d5d096a --- /dev/null +++ b/crates/shirabe/tests/event_dispatcher/main.rs @@ -0,0 +1 @@ +mod event_dispatcher_test; |
