aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/downloader/download_manager_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 05:09:56 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 05:09:56 +0900
commit25f96cab45f5da4fba2ef0486a0b0bc8f7ca87b0 (patch)
tree0974de4f5e7a19415f2bcda9adc34cb95263b2e9 /crates/shirabe/tests/downloader/download_manager_test.rs
parentb07f3a9f51d7ce5ea8ee4dc45da7fe9a55b7f1d4 (diff)
downloadphp-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/downloader/download_manager_test.rs')
-rw-r--r--crates/shirabe/tests/downloader/download_manager_test.rs44
1 files changed, 44 insertions, 0 deletions
diff --git a/crates/shirabe/tests/downloader/download_manager_test.rs b/crates/shirabe/tests/downloader/download_manager_test.rs
index b13420b..a047420 100644
--- a/crates/shirabe/tests/downloader/download_manager_test.rs
+++ b/crates/shirabe/tests/downloader/download_manager_test.rs
@@ -1 +1,45 @@
//! ref: composer/tests/Composer/Test/Downloader/DownloadManagerTest.php
+
+// These mock IO and individual downloaders to drive DownloadManager's selection/download/
+// update/remove logic; mocking is not available here.
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_set_get_downloader);
+stub!(test_get_downloader_for_incorrectly_installed_package);
+stub!(test_get_downloader_for_correctly_installed_dist_package);
+stub!(test_get_downloader_for_incorrectly_installed_dist_package);
+stub!(test_get_downloader_for_correctly_installed_source_package);
+stub!(test_get_downloader_for_incorrectly_installed_source_package);
+stub!(test_get_downloader_for_metapackage);
+stub!(test_full_package_download);
+stub!(test_full_package_download_failover);
+stub!(test_bad_package_download);
+stub!(test_dist_only_package_download);
+stub!(test_source_only_package_download);
+stub!(test_metapackage_package_download);
+stub!(test_full_package_download_with_source_preferred);
+stub!(test_dist_only_package_download_with_source_preferred);
+stub!(test_source_only_package_download_with_source_preferred);
+stub!(test_bad_package_download_with_source_preferred);
+stub!(test_update_dist_with_equal_types);
+stub!(test_update_dist_with_not_equal_types);
+stub!(test_get_available_sources_update_sticks_to_same_source);
+stub!(test_update_metapackage);
+stub!(test_remove);
+stub!(test_metapackage_remove);
+stub!(test_install_preference_without_preference_dev);
+stub!(test_install_preference_without_preference_no_dev);
+stub!(test_install_preference_without_match_dev);
+stub!(test_install_preference_without_match_no_dev);
+stub!(test_install_preference_with_match_auto_dev);
+stub!(test_install_preference_with_match_auto_no_dev);
+stub!(test_install_preference_with_match_source);
+stub!(test_install_preference_with_match_dist);