diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-25 03:20:08 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-25 03:33:09 +0900 |
| commit | c65cab710bb3d79db20862c9361d4dbbac8ac5d7 (patch) | |
| tree | b4d192237bbb8dbaa80166f1ffa24703e57243f4 /crates/shirabe/tests/config_test.rs | |
| parent | f73e9ab05f8d94937d2437919199d9d9681c8cde (diff) | |
| download | php-shirabe-c65cab710bb3d79db20862c9361d4dbbac8ac5d7.tar.gz php-shirabe-c65cab710bb3d79db20862c9361d4dbbac8ac5d7.tar.zst php-shirabe-c65cab710bb3d79db20862c9361d4dbbac8ac5d7.zip | |
feat(php-shim): model $_ENV/$_SERVER as OsString snapshots
Rework the environment shim around getenv/putenv on the real environment
and $_ENV/$_SERVER as startup snapshots, all over OsString. Migrate every
caller off the old server()/server_argv() helpers and force the snapshots
in main() before any putenv() runs. Document the porting rules in
docs/dev/env-vars-porting.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/config_test.rs')
| -rw-r--r-- | crates/shirabe/tests/config_test.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/shirabe/tests/config_test.rs b/crates/shirabe/tests/config_test.rs index 9c2f80b..df29281 100644 --- a/crates/shirabe/tests/config_test.rs +++ b/crates/shirabe/tests/config_test.rs @@ -1,6 +1,7 @@ //! ref: composer/tests/Composer/Test/ConfigTest.php use indexmap::IndexMap; +use serial_test::serial; use shirabe::advisory::Auditor; use shirabe::config::Config; use shirabe::util::Platform; @@ -509,6 +510,7 @@ fn test_disable_tls_can_be_overridden() { } #[test] +#[serial] fn test_process_timeout() { Platform::put_env("COMPOSER_PROCESS_TIMEOUT", "0"); let config = Config::new(true, None); @@ -520,6 +522,7 @@ fn test_process_timeout() { #[ignore] #[test] +#[serial] fn test_htaccess_protect() { Platform::put_env("COMPOSER_HTACCESS_PROTECT", "0"); let config = Config::new(true, None); @@ -530,6 +533,7 @@ fn test_htaccess_protect() { } #[test] +#[serial] fn test_get_source_of_value() { Platform::clear_env("COMPOSER_PROCESS_TIMEOUT"); @@ -552,6 +556,7 @@ fn test_get_source_of_value() { } #[test] +#[serial] fn test_get_source_of_value_env_variables() { Platform::put_env("COMPOSER_HTACCESS_PROTECT", "0"); let mut config = Config::new(true, None); @@ -562,6 +567,7 @@ fn test_get_source_of_value_env_variables() { } #[test] +#[serial] fn test_audit() { let mut config = Config::new(true, None); let result = config.get("audit"); |
