aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/util/git_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-30 01:23:13 +0900
committernsfisis <nsfisis@gmail.com>2026-06-30 01:23:13 +0900
commit2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f (patch)
treecd4c272651e8a2727debf89e24f09e1c29b18fbc /crates/shirabe/tests/util/git_test.rs
parent91ccd49cf68bca199e7d41fa65a4a3b0d1368127 (diff)
downloadphp-shirabe-2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f.tar.gz
php-shirabe-2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f.tar.zst
php-shirabe-2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f.zip
refactor(git): replace is_callable with RunCommandOutput trait
Model Git::runCommand's mixed $commandOutput parameter with the RunCommandOutput trait (one impl per PHP mode: discard, by-ref capture, callable handler), mirroring ProcessExecutor's IntoExecOutput. This moves the is_callable($commandOutput) value-inspection into the type system and drops the dependency on the shim's incomplete is_callable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/util/git_test.rs')
-rw-r--r--crates/shirabe/tests/util/git_test.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/shirabe/tests/util/git_test.rs b/crates/shirabe/tests/util/git_test.rs
index 43af80a..991dc91 100644
--- a/crates/shirabe/tests/util/git_test.rs
+++ b/crates/shirabe/tests/util/git_test.rs
@@ -131,7 +131,7 @@ fn test_run_command_public_git_hub_repository_not_initial_clone_ssh() {
"https://github.com/acme/repo",
None,
true,
- None,
+ (),
)
.unwrap();
}
@@ -157,7 +157,7 @@ fn test_run_command_public_git_hub_repository_not_initial_clone_https() {
"https://github.com/acme/repo",
None,
true,
- None,
+ (),
)
.unwrap();
}
@@ -188,7 +188,7 @@ fn test_run_command_private_git_hub_repository_not_initial_clone_not_interactive
"https://github.com/acme/repo",
None,
true,
- None,
+ (),
);
let err = result.expect_err("expected a RuntimeException");
@@ -232,7 +232,7 @@ fn run_command_private_github_with_authentication(
let mut git = build_git(io, config, process);
- git.__run_command(vec![command_callable], git_url, None, true, None)
+ git.__run_command(vec![command_callable], git_url, None, true, ())
.unwrap();
}
@@ -317,7 +317,7 @@ fn run_command_private_bitbucket_with_authentication(
let mut git = build_git(io, config, process);
- git.__run_command(vec![command_callable], git_url, None, true, None)
+ git.__run_command(vec![command_callable], git_url, None, true, ())
.unwrap();
}
@@ -481,7 +481,7 @@ fn run_command_private_bitbucket_interactive_with_oauth(
let mut git = build_git(io, config, process);
git.set_http_downloader(downloader);
- git.__run_command(vec![command_callable], git_url, None, true, None)
+ git.__run_command(vec![command_callable], git_url, None, true, ())
.unwrap();
}