aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/util/perforce_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 05:17:53 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 11:49:31 +0900
commit4b92ecafd7634ad99aa432d58fbc1958d1f01270 (patch)
tree7967e53dc0fa9be5ba525c2ec8ce6496aa559857 /crates/shirabe/tests/util/perforce_test.rs
parent3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d (diff)
downloadphp-shirabe-4b92ecafd7634ad99aa432d58fbc1958d1f01270.tar.gz
php-shirabe-4b92ecafd7634ad99aa432d58fbc1958d1f01270.tar.zst
php-shirabe-4b92ecafd7634ad99aa432d58fbc1958d1f01270.zip
test: port remaining repository and util tests as stubs
All ignored: Composer/Filesystem/Platform/Vcs repositories and the AuthHelper/Bitbucket/Git/Perforce/RemoteFilesystem/Svn utils mock IO/Config/HttpDownloader(curl)/ProcessExecutor or use reflection; Filesystem/ProcessExecutor/StreamContextFactory/ProxyManager need on-disk fixtures or proxy env. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/util/perforce_test.rs')
-rw-r--r--crates/shirabe/tests/util/perforce_test.rs51
1 files changed, 51 insertions, 0 deletions
diff --git a/crates/shirabe/tests/util/perforce_test.rs b/crates/shirabe/tests/util/perforce_test.rs
index 3a1a5a3..3958b83 100644
--- a/crates/shirabe/tests/util/perforce_test.rs
+++ b/crates/shirabe/tests/util/perforce_test.rs
@@ -1 +1,52 @@
//! ref: composer/tests/Composer/Test/Util/PerforceTest.php
+
+// These mock IO and a ProcessExecutor to drive Perforce client/stream/command behaviour;
+// mocking is not available here.
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_get_client_without_stream);
+stub!(test_get_client_from_stream);
+stub!(test_get_stream_without_stream);
+stub!(test_get_stream_with_stream);
+stub!(test_get_stream_without_label_with_stream_without_label);
+stub!(test_get_stream_without_label_with_stream_with_label);
+stub!(test_get_client_spec);
+stub!(test_generate_p4_command);
+stub!(test_query_p4_user_with_user_already_set);
+stub!(test_query_p4_user_with_user_set_in_p4_variables_with_windows_os);
+stub!(test_query_p4_user_with_user_set_in_p4_variables_not_windows_os);
+stub!(test_query_p4_user_queries_for_user);
+stub!(test_query_p4_user_stores_response_to_query_for_user_with_windows);
+stub!(test_query_p4_user_stores_response_to_query_for_user_without_windows);
+stub!(test_query_p4_user_escapes_injection_on_windows);
+stub!(test_query_p4_user_escapes_injection_on_unix);
+stub!(test_query_p4_password_with_password_already_set);
+stub!(test_query_p4_password_with_password_set_in_p4_variables_with_windows_os);
+stub!(test_query_p4_password_with_password_set_in_p4_variables_not_windows_os);
+stub!(test_query_p4_password_queries_for_password);
+stub!(test_write_p4_client_spec_without_stream);
+stub!(test_write_p4_client_spec_with_stream);
+stub!(test_is_logged_in);
+stub!(test_get_branches_with_stream);
+stub!(test_get_branches_without_stream);
+stub!(test_get_tags_without_stream);
+stub!(test_get_tags_with_stream);
+stub!(test_check_stream_without_stream);
+stub!(test_check_stream_with_stream);
+stub!(test_get_composer_information_without_label_without_stream);
+stub!(test_get_composer_information_with_label_without_stream);
+stub!(test_get_composer_information_without_label_with_stream);
+stub!(test_get_composer_information_with_label_with_stream);
+stub!(test_sync_code_base_without_stream);
+stub!(test_sync_code_base_with_stream);
+stub!(test_check_server_exists);
+stub!(test_check_server_client_error);
+stub!(test_cleanup_client_spec_should_delete_client);