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/downloader/file_downloader_test.rs | |
| 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/downloader/file_downloader_test.rs')
| -rw-r--r-- | crates/shirabe/tests/downloader/file_downloader_test.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/shirabe/tests/downloader/file_downloader_test.rs b/crates/shirabe/tests/downloader/file_downloader_test.rs index 54afad4..4e9cbc6 100644 --- a/crates/shirabe/tests/downloader/file_downloader_test.rs +++ b/crates/shirabe/tests/downloader/file_downloader_test.rs @@ -1 +1,23 @@ //! ref: composer/tests/Composer/Test/Downloader/FileDownloaderTest.php + +// These construct a FileDownloader with a mocked IO/HttpDownloader (curl_multi_init todo!()) +// and a mocked Cache/Package to drive download/checksum behaviour. +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] + fn $name() { + todo!() + } + }; +} + +stub!(test_download_for_package_without_dist_reference); +stub!(test_download_to_existing_file); +stub!(test_get_file_name); +stub!(test_download_but_file_is_unsaved); +stub!(test_download_with_custom_processed_url); +stub!(test_download_with_custom_cache_key); +stub!(test_cache_garbage_collection_is_called); +stub!(test_download_file_with_invalid_checksum); +stub!(test_downgrade_shows_appropriate_message); |
