aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/repository/vcs/git_driver_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 04:41:01 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 04:41:01 +0900
commita5b5366492d87ebf3fd0b1aaf77c15dfa978ae95 (patch)
treeaf993f05750537f53b9cbce3457715128599f0ea /crates/shirabe/tests/repository/vcs/git_driver_test.rs
parent46ff68a20235cb6ba05d00b001f334abc303eef8 (diff)
downloadphp-shirabe-a5b5366492d87ebf3fd0b1aaf77c15dfa978ae95.tar.gz
php-shirabe-a5b5366492d87ebf3fd0b1aaf77c15dfa978ae95.tar.zst
php-shirabe-a5b5366492d87ebf3fd0b1aaf77c15dfa978ae95.zip
test(repository): port VCS driver tests (Git/GitHub/GitLab/Bitbucket/Svn/Perforce/Forgejo)
Svn/GitBitbucket/Perforce supports pass. GitHub::supports reaches non-strict in_array (todo!()) and Forgejo::supports uses a regex the regex crate cannot compile, so those are ignored. All API-driven cases mock the HttpDownloader (curl) / ProcessExecutor and are stubbed. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/repository/vcs/git_driver_test.rs')
-rw-r--r--crates/shirabe/tests/repository/vcs/git_driver_test.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/shirabe/tests/repository/vcs/git_driver_test.rs b/crates/shirabe/tests/repository/vcs/git_driver_test.rs
index c915947..85c9f0b 100644
--- a/crates/shirabe/tests/repository/vcs/git_driver_test.rs
+++ b/crates/shirabe/tests/repository/vcs/git_driver_test.rs
@@ -1 +1,22 @@
//! ref: composer/tests/Composer/Test/Repository/Vcs/GitDriverTest.php
+
+// Every case constructs a GitDriver with a mocked ProcessExecutor (and an HttpDownloader
+// that reaches curl_multi_init, todo!()) to feed git command output; mocking is not
+// available here.
+
+macro_rules! git_stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "constructs a GitDriver and mocks a ProcessExecutor/HttpDownloader (curl_multi_init todo!())"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+git_stub!(test_get_root_identifier_from_remote_local_repository);
+git_stub!(test_get_root_identifier_from_remote);
+git_stub!(test_get_root_identifier_from_local_with_network_disabled);
+git_stub!(test_get_branches_filter_invalid_branch_names);
+git_stub!(test_file_get_content_invalid_identifier);
+git_stub!(test_get_change_date_invalid_identifier);