diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 05:17:53 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 11:49:31 +0900 |
| commit | 4b92ecafd7634ad99aa432d58fbc1958d1f01270 (patch) | |
| tree | 7967e53dc0fa9be5ba525c2ec8ce6496aa559857 /crates/shirabe/tests/util/http | |
| parent | 3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d (diff) | |
| download | php-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/util/http')
| -rw-r--r-- | crates/shirabe/tests/util/http/mod.rs | 1 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/http/proxy_manager_test.rs | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/crates/shirabe/tests/util/http/mod.rs b/crates/shirabe/tests/util/http/mod.rs index def35cb..a4f826f 100644 --- a/crates/shirabe/tests/util/http/mod.rs +++ b/crates/shirabe/tests/util/http/mod.rs @@ -1,2 +1,3 @@ mod proxy_item_test; +mod proxy_manager_test; mod request_proxy_test; diff --git a/crates/shirabe/tests/util/http/proxy_manager_test.rs b/crates/shirabe/tests/util/http/proxy_manager_test.rs index a37c45b..50be143 100644 --- a/crates/shirabe/tests/util/http/proxy_manager_test.rs +++ b/crates/shirabe/tests/util/http/proxy_manager_test.rs @@ -1 +1,21 @@ //! ref: composer/tests/Composer/Test/Util/Http/ProxyManagerTest.php + +// ProxyManager reads HTTP(S)_PROXY / CGI_HTTP_PROXY / no_proxy environment variables; the +// env-dependent setup (without its setUp/tearDown isolation) is not ported. +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] + fn $name() { + todo!() + } + }; +} + +stub!(test_instantiation); +stub!(test_get_proxy_for_request_throws_on_bad_proxy_url); +stub!(test_lowercase_overrides_uppercase); +stub!(test_cgi_proxy_is_only_used_when_no_http_proxy); +stub!(test_no_http_proxy_does_not_use_https_proxy); +stub!(test_no_https_proxy_does_not_use_http_proxy); +stub!(test_get_proxy_for_request); |
