From b55b030fb6a9c0b31a2ba16f708358e37949a323 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 04:45:26 +0900 Subject: test(command): port remaining command tests as ApplicationTester stubs Adds Base/Bump/Config/DumpAutoload/Fund/Global/Init/Install/Licenses/Remove/ Repository/Require/RunScript/Show/Suggests/Update command tests. All ignored: they need the ApplicationTester/initTempComposer harness (Init also reflects into protected helpers). setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/tests/command/init_command_test.rs | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'crates/shirabe/tests/command/init_command_test.rs') diff --git a/crates/shirabe/tests/command/init_command_test.rs b/crates/shirabe/tests/command/init_command_test.rs index 9108496..69d721b 100644 --- a/crates/shirabe/tests/command/init_command_test.rs +++ b/crates/shirabe/tests/command/init_command_test.rs @@ -1 +1,29 @@ //! ref: composer/tests/Composer/Test/Command/InitCommandTest.php + +// The author/namespace/git-config helpers are protected methods exercised via reflection +// in PHP; the run cases need the ApplicationTester. Neither is available here. + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] + fn $name() { + todo!() + } + }; +} + +stub!(test_parse_valid_author_string); +stub!(test_parse_empty_author_string); +stub!(test_parse_author_string_with_invalid_email); +stub!(test_namespace_from_valid_package_name); +stub!(test_namespace_from_invalid_package_name); +stub!(test_namespace_from_missing_package_name); +stub!(test_run_command); +stub!(test_run_command_invalid); +stub!(test_run_guess_name_from_dir_sanitizes_dir); +stub!(test_interactive_run); +stub!(test_format_authors); +stub!(test_get_git_config); +stub!(test_add_vendor_ignore); +stub!(test_has_vendor_ignore); -- cgit v1.3.1