diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 13:11:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 13:11:49 +0900 |
| commit | f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d (patch) | |
| tree | a8b91efea7f17e61a8d0d9a82604d3ed964010a7 /crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs | |
| parent | b1571202200e4dc630202928f5ff78959273c7ec (diff) | |
| download | php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.tar.gz php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.tar.zst php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.zip | |
test(tests): expand stub macros into plain test functions
The per-file stub!/encode_stub!/etc. macros generated #[ignore]d test
functions but obscured the individual test bodies. Expanding them inline
removes the macro indirection so future ports can fill in each function
directly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs')
| -rw-r--r-- | crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs | 126 |
1 files changed, 102 insertions, 24 deletions
diff --git a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs index 3d9ee0a..8e979a0 100644 --- a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs +++ b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs @@ -17,29 +17,107 @@ impl Drop for TearDown { // 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() { - let _tear_down = TearDown; - todo!() - } - }; +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_listener_exceptions_are_caught() { + let _tear_down = TearDown; + 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); +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_can_execute_single_command_line_script() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_pass_dev_mode_to_autoload_generator_for_script_events() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_remove_listener() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_can_execute_cli_and_php_in_same_event_script_stack() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_can_put_env() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_appends_dir_bin_on_path_for_every_listener() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_support_for_additional_args() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_can_execute_composer_script_groups() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_recursion_in_scripts_names() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_detect_infinite_recursion() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_outputs_command() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_outputs_error_on_failed_command() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_installer_events() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_doesnt_return_skipped_scripts() { + let _tear_down = TearDown; + todo!() +} |
