aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/archive_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-28 22:22:01 +0900
committernsfisis <nsfisis@gmail.com>2026-06-28 22:22:01 +0900
commit1e72ee3ddaf581753e30b39dfc33b48d44a25ef7 (patch)
tree65f92b778f853bf25b6d20080b369f9b91773c52 /crates/shirabe/src/command/archive_command.rs
parent4728dbcddc1de54a2c8f2e90c8a1f80098485e22 (diff)
downloadphp-shirabe-1e72ee3ddaf581753e30b39dfc33b48d44a25ef7.tar.gz
php-shirabe-1e72ee3ddaf581753e30b39dfc33b48d44a25ef7.tar.zst
php-shirabe-1e72ee3ddaf581753e30b39dfc33b48d44a25ef7.zip
test(installer): port InstallerTest unit and integration harness
Port composer/tests/Composer/Test/InstallerTest.php. testInstaller (the provideInstaller cases) is fully ported and passes; the three integration tests port doTestIntegration in full (the .test fixture loader, FactoryMock, the in-process console Application with install/update commands, and the PHPUnit assertStringMatchesFormat matcher) and remain #[ignore]'d since the install pipeline is not yet executable end-to-end. Add test-only `__`-seams to the concrete types the test depends on, since their consumers (e.g. Locker takes the concrete InstallationManager) and the subclass-style mocks have no trait to mock: InstallationManager (recording mock + as_any), Factory (__create_mock), VersionGuesser, and InstalledFilesystemRepository. The production path (mock: false) is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/archive_command.rs')
-rw-r--r--crates/shirabe/src/command/archive_command.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe/src/command/archive_command.rs b/crates/shirabe/src/command/archive_command.rs
index 91e8036..ce1d496 100644
--- a/crates/shirabe/src/command/archive_command.rs
+++ b/crates/shirabe/src/command/archive_command.rs
@@ -288,7 +288,7 @@ impl ArchiveCommand {
composer_archive_manager_ref = composer_archive_manager.borrow_mut();
&mut *composer_archive_manager_ref
} else {
- let factory = Factory;
+ let factory = Factory::default();
let process = std::rc::Rc::new(std::cell::RefCell::new(ProcessExecutor::new(None)));
let http_downloader = std::rc::Rc::new(std::cell::RefCell::new(
Factory::create_http_downloader(io.clone(), config, indexmap::IndexMap::new())?,