diff options
Diffstat (limited to 'crates/shirabe/tests/command')
17 files changed, 324 insertions, 0 deletions
diff --git a/crates/shirabe/tests/command/base_dependency_command_test.rs b/crates/shirabe/tests/command/base_dependency_command_test.rs index d6ac4d7..c8ea33a 100644 --- a/crates/shirabe/tests/command/base_dependency_command_test.rs +++ b/crates/shirabe/tests/command/base_dependency_command_test.rs @@ -1 +1,19 @@ //! ref: composer/tests/Composer/Test/Command/BaseDependencyCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_exception_when_no_required_parameters); +stub!(test_exception_when_running_locked_without_lock_file); +stub!(test_exception_when_it_could_not_found_the_package); +stub!(test_exception_when_package_was_not_found_in_project); +stub!(test_warning_when_dependencies_are_not_installed); +stub!(test_why_command_outputs); +stub!(test_why_not_command_outputs); diff --git a/crates/shirabe/tests/command/bump_command_test.rs b/crates/shirabe/tests/command/bump_command_test.rs index 3478643..70adc30 100644 --- a/crates/shirabe/tests/command/bump_command_test.rs +++ b/crates/shirabe/tests/command/bump_command_test.rs @@ -1 +1,15 @@ //! ref: composer/tests/Composer/Test/Command/BumpCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_bump); +stub!(test_bump_fails_on_non_existing_composer_file); +stub!(test_bump_fails_on_write_error_to_composer_file); diff --git a/crates/shirabe/tests/command/config_command_test.rs b/crates/shirabe/tests/command/config_command_test.rs index f7a3a96..b0e1b97 100644 --- a/crates/shirabe/tests/command/config_command_test.rs +++ b/crates/shirabe/tests/command/config_command_test.rs @@ -1 +1,17 @@ //! ref: composer/tests/Composer/Test/Command/ConfigCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_config_updates); +stub!(test_config_reads); +stub!(test_config_throws_for_invalid_arg_combination); +stub!(test_config_throws_for_invalid_severity); +stub!(test_config_throws_when_merging_array_with_object); diff --git a/crates/shirabe/tests/command/dump_autoload_command_test.rs b/crates/shirabe/tests/command/dump_autoload_command_test.rs index 0335e98..566dc0c 100644 --- a/crates/shirabe/tests/command/dump_autoload_command_test.rs +++ b/crates/shirabe/tests/command/dump_autoload_command_test.rs @@ -1 +1,24 @@ //! ref: composer/tests/Composer/Test/Command/DumpAutoloadCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_dump_autoload); +stub!(test_dump_dev_autoload); +stub!(test_dump_no_dev_autoload); +stub!(test_using_optimize_and_strict_psr); +stub!(test_fails_using_strict_psr_if_class_map_violations_are_found); +stub!(test_using_classmap_authoritative); +stub!(test_using_classmap_authoritative_and_strict_psr); +stub!(test_strict_psr_does_not_work_without_optimized_autoloader); +stub!(test_dev_and_no_dev_cannot_be_combined); +stub!(test_with_custom_autoloader_suffix); +stub!(test_with_existing_composer_lock_and_autoloader_suffix); +stub!(test_with_existing_composer_lock_without_autoloader_suffix); diff --git a/crates/shirabe/tests/command/fund_command_test.rs b/crates/shirabe/tests/command/fund_command_test.rs index d4bf441..d66795f 100644 --- a/crates/shirabe/tests/command/fund_command_test.rs +++ b/crates/shirabe/tests/command/fund_command_test.rs @@ -1 +1,7 @@ //! ref: composer/tests/Composer/Test/Command/FundCommandTest.php + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_fund_command() { + todo!() +} diff --git a/crates/shirabe/tests/command/global_command_test.rs b/crates/shirabe/tests/command/global_command_test.rs index 63ad32e..274f5cf 100644 --- a/crates/shirabe/tests/command/global_command_test.rs +++ b/crates/shirabe/tests/command/global_command_test.rs @@ -1 +1,20 @@ //! ref: composer/tests/Composer/Test/Command/GlobalCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_global); +stub!(test_cannot_create_home); +stub!(test_global_show); +stub!(test_global_show_without_packages); +stub!(test_global_require); +stub!(test_global_update); +stub!(test_global_changes_directory); +stub!(test_global_missing_command_name); 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); diff --git a/crates/shirabe/tests/command/install_command_test.rs b/crates/shirabe/tests/command/install_command_test.rs index 44c0df7..9bb5635 100644 --- a/crates/shirabe/tests/command/install_command_test.rs +++ b/crates/shirabe/tests/command/install_command_test.rs @@ -1 +1,16 @@ //! ref: composer/tests/Composer/Test/Command/InstallCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_install_command_errors); +stub!(test_install_from_empty_vendor); +stub!(test_install_from_empty_vendor_no_dev); +stub!(test_install_new_packages_with_existing_partial_vendor); diff --git a/crates/shirabe/tests/command/licenses_command_test.rs b/crates/shirabe/tests/command/licenses_command_test.rs index 7b3c44f..e1dfe20 100644 --- a/crates/shirabe/tests/command/licenses_command_test.rs +++ b/crates/shirabe/tests/command/licenses_command_test.rs @@ -1 +1,20 @@ //! ref: composer/tests/Composer/Test/Command/LicensesCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_basic_run); +stub!(test_no_dev); +stub!(test_format_json); +stub!(test_format_summary); +stub!(test_format_unknown); +stub!(test_locked); +stub!(test_locked_no_dev); +stub!(test_locked_without_lock_file); diff --git a/crates/shirabe/tests/command/main.rs b/crates/shirabe/tests/command/main.rs index 5e3922c..287fb27 100644 --- a/crates/shirabe/tests/command/main.rs +++ b/crates/shirabe/tests/command/main.rs @@ -1,13 +1,29 @@ mod about_command_test; mod archive_command_test; mod audit_command_test; +mod base_dependency_command_test; +mod bump_command_test; mod check_platform_reqs_command_test; mod clear_cache_command_test; +mod config_command_test; mod diagnose_command_test; +mod dump_autoload_command_test; mod exec_command_test; +mod fund_command_test; +mod global_command_test; mod home_command_test; +mod init_command_test; +mod install_command_test; +mod licenses_command_test; mod reinstall_command_test; +mod remove_command_test; +mod repository_command_test; +mod require_command_test; +mod run_script_command_test; mod search_command_test; mod self_update_command_test; +mod show_command_test; mod status_command_test; +mod suggests_command_test; +mod update_command_test; mod validate_command_test; diff --git a/crates/shirabe/tests/command/remove_command_test.rs b/crates/shirabe/tests/command/remove_command_test.rs index d2b26a4..4e3497a 100644 --- a/crates/shirabe/tests/command/remove_command_test.rs +++ b/crates/shirabe/tests/command/remove_command_test.rs @@ -1 +1,28 @@ //! ref: composer/tests/Composer/Test/Command/RemoveCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_exception_running_with_no_remove_packages); +stub!(test_exception_when_running_unused_without_lock_file); +stub!(test_warning_when_removing_non_existent_package); +stub!(test_warning_when_removing_package_from_wrong_type); +stub!(test_warning_when_removing_package_with_deprecated_dependencies_flag); +stub!(test_message_output_when_no_unused_packages_to_remove); +stub!(test_remove_unused_package); +stub!(test_remove_package_by_name); +stub!(test_remove_package_by_name_with_dry_run); +stub!(test_remove_allowed_plugin_package_with_no_other_allowed_plugins); +stub!(test_remove_allowed_plugin_package_with_other_allowed_plugins); +stub!(test_remove_packages_by_vendor); +stub!(test_remove_packages_by_vendor_with_dry_run); +stub!(test_warning_when_removing_packages_by_vendor_from_wrong_type); +stub!(test_package_still_present_error_when_no_install_flag_used); +stub!(test_update_inherited_dependencies_flag_is_passed_to_post_remove_installer); diff --git a/crates/shirabe/tests/command/repository_command_test.rs b/crates/shirabe/tests/command/repository_command_test.rs index 52ee7ec..7611785 100644 --- a/crates/shirabe/tests/command/repository_command_test.rs +++ b/crates/shirabe/tests/command/repository_command_test.rs @@ -1 +1,28 @@ //! ref: composer/tests/Composer/Test/Command/RepositoryCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_list_with_no_repositories); +stub!(test_list_with_repositories_as_list); +stub!(test_list_with_repositories_as_assoc); +stub!(test_add_repository_with_type_and_url); +stub!(test_add_repository_with_json); +stub!(test_remove_repository); +stub!(test_set_and_get_url_in_repository_assoc); +stub!(test_set_and_get_url_in_repository_list); +stub!(test_disable_and_enable_packagist); +stub!(test_invalid_arg_combination_throws); +stub!(test_prepend_repository_by_name_list_to_assoc); +stub!(test_append_repository_by_name_list_to_assoc); +stub!(test_prepend_repository_assoc_with_packagist_disabled); +stub!(test_append_repository_assoc_with_packagist_disabled); +stub!(test_add_before_and_after_by_name); +stub!(test_add_same_name_replaces_existing); diff --git a/crates/shirabe/tests/command/require_command_test.rs b/crates/shirabe/tests/command/require_command_test.rs index 2201745..452892d 100644 --- a/crates/shirabe/tests/command/require_command_test.rs +++ b/crates/shirabe/tests/command/require_command_test.rs @@ -1 +1,16 @@ //! ref: composer/tests/Composer/Test/Command/RequireCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_require_throws_if_none_matches); +stub!(test_require_warns_if_resolved_to_feature_branch); +stub!(test_require); +stub!(test_inconsistent_require_keys); diff --git a/crates/shirabe/tests/command/run_script_command_test.rs b/crates/shirabe/tests/command/run_script_command_test.rs index 9ae8c5f..9ec848d 100644 --- a/crates/shirabe/tests/command/run_script_command_test.rs +++ b/crates/shirabe/tests/command/run_script_command_test.rs @@ -1 +1,17 @@ //! ref: composer/tests/Composer/Test/Command/RunScriptCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_detect_and_pass_dev_mode_to_event_and_to_dispatching); +stub!(test_can_list_scripts); +stub!(test_can_define_aliases); +stub!(test_execution_of_simple_symfony_command); +stub!(test_execution_of_symfony_command_with_configuration); diff --git a/crates/shirabe/tests/command/show_command_test.rs b/crates/shirabe/tests/command/show_command_test.rs index 932dc3a..6c2cf13 100644 --- a/crates/shirabe/tests/command/show_command_test.rs +++ b/crates/shirabe/tests/command/show_command_test.rs @@ -1 +1,35 @@ //! ref: composer/tests/Composer/Test/Command/ShowCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_show); +stub!(test_outdated_filters_according_to_platform_reqs_and_warns); +stub!(test_outdated_filters_according_to_platform_reqs_without_warning_for_higher_versions); +stub!(test_show_direct_with_name_does_not_show_transient_dependencies); +stub!(test_show_direct_with_name_only_shows_direct_dependents); +stub!(test_show_platform_only_shows_platform_packages); +stub!(test_show_platform_works_without_composer_json); +stub!(test_outdated_with_zero_major); +stub!(test_show_all_shows_all_sections); +stub!(test_locked_requires_valid_lock_file); +stub!(test_locked_shows_all_locked); +stub!(test_invalid_option_combinations); +stub!(test_ignored_option_combinations); +stub!(test_self_and_name_only); +stub!(test_self_and_package_combination); +stub!(test_self); +stub!(test_not_installed_error); +stub!(test_no_dev_option); +stub!(test_package_filter); +stub!(test_not_existing_package); +stub!(test_not_existing_package_with_working_dir); +stub!(test_specific_package_and_tree); +stub!(test_name_only_prints_no_trailing_whitespace); diff --git a/crates/shirabe/tests/command/suggests_command_test.rs b/crates/shirabe/tests/command/suggests_command_test.rs index 857535a..21e9ec7 100644 --- a/crates/shirabe/tests/command/suggests_command_test.rs +++ b/crates/shirabe/tests/command/suggests_command_test.rs @@ -1 +1,14 @@ //! ref: composer/tests/Composer/Test/Command/SuggestsCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_installed_packages_with_no_suggestions); +stub!(test_suggest); diff --git a/crates/shirabe/tests/command/update_command_test.rs b/crates/shirabe/tests/command/update_command_test.rs index 180c90f..35053b0 100644 --- a/crates/shirabe/tests/command/update_command_test.rs +++ b/crates/shirabe/tests/command/update_command_test.rs @@ -1 +1,19 @@ //! ref: composer/tests/Composer/Test/Command/UpdateCommandTest.php + +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] + fn $name() { + todo!() + } + }; +} + +stub!(test_update); +stub!(test_update_with_patch_only); +stub!(test_interactive_mode_throws_if_no_package_to_update); +stub!(test_interactive_mode_throws_if_no_package_entered); +stub!(test_interactive_tmp); +stub!(test_no_security_blocking_allows_insecure_packages); +stub!(test_bump_after_update_without_lockfile); |
