aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/package/locker_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 05:13:03 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 05:13:03 +0900
commit3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d (patch)
treeb18aeb4b6b98ea2c74450b8c38e99c7607bd66c0 /crates/shirabe/tests/package/locker_test.rs
parent25f96cab45f5da4fba2ef0486a0b0bc8f7ca87b0 (diff)
downloadphp-shirabe-3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d.tar.gz
php-shirabe-3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d.tar.zst
php-shirabe-3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d.zip
test: port package archiver/loader/version/locker and PluginInstaller stubs
All ignored: ArrayLoader/ValidatingArrayLoader/VersionSelector parse constraints via a look-around regex; ArchiveManager uses PharData (todo!()); ArchivableFilesFinder/VersionGuesser/Locker mock git/process/IO; the plugin API is not implemented (TODO(plugin)). Wires up the plugin test target. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/package/locker_test.rs')
-rw-r--r--crates/shirabe/tests/package/locker_test.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/shirabe/tests/package/locker_test.rs b/crates/shirabe/tests/package/locker_test.rs
index 6bfc8bc..4023c10 100644
--- a/crates/shirabe/tests/package/locker_test.rs
+++ b/crates/shirabe/tests/package/locker_test.rs
@@ -1 +1,25 @@
//! ref: composer/tests/Composer/Test/Package/LockerTest.php
+
+// These construct a Locker with a mocked JsonFile/InstallationManager/repository and a
+// mocked ProcessExecutor to drive lock read/write and freshness checks; mocking is not
+// available here.
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_is_locked);
+stub!(test_get_not_locked_packages);
+stub!(test_get_locked_packages);
+stub!(test_set_lock_data);
+stub!(test_lock_bad_packages);
+stub!(test_is_fresh);
+stub!(test_is_fresh_false);
+stub!(test_is_fresh_with_content_hash);
+stub!(test_is_fresh_with_content_hash_and_no_hash);
+stub!(test_is_fresh_false_with_content_hash);