aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/plugin/e2e_extension_installer_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-16 16:25:35 +0900
committernsfisis <nsfisis@gmail.com>2026-08-16 17:34:46 +0900
commit4065d8842beb5d1648131bd5b1951adf7a27b5b7 (patch)
tree71508f3bfc34330e210227b63619342444b19330 /crates/shirabe/tests/plugin/e2e_extension_installer_test.rs
parent2bb7e5b09947154fd3b2e20d9f4837482e96ab1a (diff)
downloadphp-shirabe-4065d8842beb5d1648131bd5b1951adf7a27b5b7.tar.gz
php-shirabe-4065d8842beb5d1648131bd5b1951adf7a27b5b7.tar.zst
php-shirabe-4065d8842beb5d1648131bd5b1951adf7a27b5b7.zip
refactor(env): route Shirabe's own env reads through the shim
These sites have no PHP counterpart to mirror, so they read std::env directly. Going through the shim's getenv() keeps every environment read in one place and lets a lint forbid the direct form. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/plugin/e2e_extension_installer_test.rs')
-rw-r--r--crates/shirabe/tests/plugin/e2e_extension_installer_test.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/tests/plugin/e2e_extension_installer_test.rs b/crates/shirabe/tests/plugin/e2e_extension_installer_test.rs
index 9a95888c..71b40ff1 100644
--- a/crates/shirabe/tests/plugin/e2e_extension_installer_test.rs
+++ b/crates/shirabe/tests/plugin/e2e_extension_installer_test.rs
@@ -8,7 +8,7 @@
//! any of these is missing. Test runs themselves are offline: the fixture project resolves
//! everything from local repositories.
-use crate::plugin_installer_test::{lock_php_worker, php_runtime_available};
+use crate::php_worker::{lock_php_worker, php_runtime_available};
use indexmap::IndexMap;
use std::path::{Path, PathBuf};
use tempfile::TempDir;
@@ -21,9 +21,9 @@ fn fixture_dir() -> PathBuf {
/// the worker). Absent checkout means the oracle cannot run; the test returns early,
/// following the convention of the non-mock tests in `shirabe-php-rpc`.
pub(crate) fn upstream_composer_bin() -> Option<PathBuf> {
- let root = match std::env::var("SHIRABE_COMPOSER_PHP_DIR") {
- Ok(dir) => PathBuf::from(dir),
- Err(_) => Path::new(env!("CARGO_MANIFEST_DIR")).join("../../composer"),
+ let root = match shirabe_php_shim::getenv("SHIRABE_COMPOSER_PHP_DIR") {
+ Some(dir) => PathBuf::from(dir),
+ None => Path::new(env!("CARGO_MANIFEST_DIR")).join("../../composer"),
};
let bin = root.join("bin/composer");
if bin.is_file() && root.join("vendor/autoload.php").is_file() {