aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/config
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/config
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/config')
-rw-r--r--crates/shirabe/tests/config/json_config_source_test.rs21
-rw-r--r--crates/shirabe/tests/config/main.rs1
2 files changed, 22 insertions, 0 deletions
diff --git a/crates/shirabe/tests/config/json_config_source_test.rs b/crates/shirabe/tests/config/json_config_source_test.rs
index 7ae61ca..293f32e 100644
--- a/crates/shirabe/tests/config/json_config_source_test.rs
+++ b/crates/shirabe/tests/config/json_config_source_test.rs
@@ -1 +1,22 @@
//! ref: composer/tests/Composer/Test/Config/JsonConfigSourceTest.php
+
+// JsonConfigSource edits composer.json through JsonManipulator, whose text-rewriting
+// operations reach addcslashes (todo!()) in the php-shim.
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_add_repository);
+stub!(test_add_repository_as_list);
+stub!(test_add_repository_with_options);
+stub!(test_remove_repository);
+stub!(test_add_packagist_repository_with_false_value);
+stub!(test_remove_packagist);
+stub!(test_add_link);
+stub!(test_remove_link);
diff --git a/crates/shirabe/tests/config/main.rs b/crates/shirabe/tests/config/main.rs
new file mode 100644
index 0000000..52ceb01
--- /dev/null
+++ b/crates/shirabe/tests/config/main.rs
@@ -0,0 +1 @@
+mod json_config_source_test;