aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/advisory
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 05:05:08 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 05:05:08 +0900
commitb07f3a9f51d7ce5ea8ee4dc45da7fe9a55b7f1d4 (patch)
tree01877d22d922feea6fe0ff2167fb75944fa086bb /crates/shirabe/tests/advisory
parent84a926e814ae7df6b2bdb95c66df6b43936e3da4 (diff)
downloadphp-shirabe-b07f3a9f51d7ce5ea8ee4dc45da7fe9a55b7f1d4.tar.gz
php-shirabe-b07f3a9f51d7ce5ea8ee4dc45da7fe9a55b7f1d4.tar.zst
php-shirabe-b07f3a9f51d7ce5ea8ee4dc45da7fe9a55b7f1d4.zip
test: port Auditor/JsonConfigSource/AutoloadGenerator as stubs
All ignored: Auditor mocks HttpDownloader and parses constraints (look-around regex); JsonConfigSource uses JsonManipulator (addcslashes todo!()); the AutoloadGenerator cases are fixture/mocked-installer integration. Wires up the config test target. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/advisory')
-rw-r--r--crates/shirabe/tests/advisory/auditor_test.rs18
-rw-r--r--crates/shirabe/tests/advisory/main.rs1
2 files changed, 19 insertions, 0 deletions
diff --git a/crates/shirabe/tests/advisory/auditor_test.rs b/crates/shirabe/tests/advisory/auditor_test.rs
index 8c6fafe..28d2600 100644
--- a/crates/shirabe/tests/advisory/auditor_test.rs
+++ b/crates/shirabe/tests/advisory/auditor_test.rs
@@ -1 +1,19 @@
//! ref: composer/tests/Composer/Test/Advisory/AuditorTest.php
+
+// These run the Auditor against a mocked HttpDownloader/IO and packages built from version
+// constraints (parsed via a look-around regex the regex crate cannot compile).
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "not yet ported (Auditor with mocked HttpDownloader/IO; constraint parsing uses a look-around regex)"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_audit);
+stub!(test_audit_with_ignore);
+stub!(test_audit_with_ignore_unreachable);
+stub!(test_audit_with_ignore_severity);
+stub!(test_needs_complete_advisory_load);
diff --git a/crates/shirabe/tests/advisory/main.rs b/crates/shirabe/tests/advisory/main.rs
index 357eff7..e0b920d 100644
--- a/crates/shirabe/tests/advisory/main.rs
+++ b/crates/shirabe/tests/advisory/main.rs
@@ -1 +1,2 @@
mod audit_config_test;
+mod auditor_test;