aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/repository/composer_repository_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 05:17:53 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 11:49:31 +0900
commit4b92ecafd7634ad99aa432d58fbc1958d1f01270 (patch)
tree7967e53dc0fa9be5ba525c2ec8ce6496aa559857 /crates/shirabe/tests/repository/composer_repository_test.rs
parent3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d (diff)
downloadphp-shirabe-4b92ecafd7634ad99aa432d58fbc1958d1f01270.tar.gz
php-shirabe-4b92ecafd7634ad99aa432d58fbc1958d1f01270.tar.zst
php-shirabe-4b92ecafd7634ad99aa432d58fbc1958d1f01270.zip
test: port remaining repository and util tests as stubs
All ignored: Composer/Filesystem/Platform/Vcs repositories and the AuthHelper/Bitbucket/Git/Perforce/RemoteFilesystem/Svn utils mock IO/Config/HttpDownloader(curl)/ProcessExecutor or use reflection; Filesystem/ProcessExecutor/StreamContextFactory/ProxyManager need on-disk fixtures or proxy env. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/repository/composer_repository_test.rs')
-rw-r--r--crates/shirabe/tests/repository/composer_repository_test.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/shirabe/tests/repository/composer_repository_test.rs b/crates/shirabe/tests/repository/composer_repository_test.rs
index 627027a..89c55b5 100644
--- a/crates/shirabe/tests/repository/composer_repository_test.rs
+++ b/crates/shirabe/tests/repository/composer_repository_test.rs
@@ -1 +1,24 @@
//! ref: composer/tests/Composer/Test/Repository/ComposerRepositoryTest.php
+
+// These construct a ComposerRepository with a mocked HttpDownloader/IO/Config and parse
+// provider/package data whose constraints go through a look-around regex; mocking is not
+// available and a real HttpDownloader reaches curl_multi_init (todo!()).
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_load_data);
+stub!(test_what_provides);
+stub!(test_search_with_type);
+stub!(test_search_with_special_chars);
+stub!(test_search_with_abandoned_packages);
+stub!(test_canonicalize_url);
+stub!(test_get_provider_names_will_return_partial_package_names);
+stub!(test_get_security_advisories_assert_repository_http_options_are_used);
+stub!(test_get_security_advisories_assert_repository_advisories_is_zero_indexed_array_with_consecutive_keys);