diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 04:19:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 04:19:24 +0900 |
| commit | 842bd6718436c3d31dfa99a123c9ade3b09f9027 (patch) | |
| tree | e68834287f67045a54616dbe4da08585737e81ad /crates/shirabe | |
| parent | c32165de121a823b9dfb0a3073d4f971f0d44e35 (diff) | |
| download | php-shirabe-842bd6718436c3d31dfa99a123c9ade3b09f9027.tar.gz php-shirabe-842bd6718436c3d31dfa99a123c9ade3b09f9027.tar.zst php-shirabe-842bd6718436c3d31dfa99a123c9ade3b09f9027.zip | |
test: port TransactionTest and StrictConfirmationQuestionTest as stubs
TransactionTest needs Transaction::new (uasort_map todo!()) and non-root link
setters; StrictConfirmationQuestionTest needs Symfony QuestionHelper. Both
stubbed. Wires up the question test target.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe')
4 files changed, 33 insertions, 0 deletions
diff --git a/crates/shirabe/tests/dependency_resolver/main.rs b/crates/shirabe/tests/dependency_resolver/main.rs index d81ab0c..50de2f2 100644 --- a/crates/shirabe/tests/dependency_resolver/main.rs +++ b/crates/shirabe/tests/dependency_resolver/main.rs @@ -5,3 +5,4 @@ mod pool_test; mod request_test; mod rule_set_iterator_test; mod rule_test; +mod transaction_test; diff --git a/crates/shirabe/tests/dependency_resolver/transaction_test.rs b/crates/shirabe/tests/dependency_resolver/transaction_test.rs index 68c1049..2ea74aa 100644 --- a/crates/shirabe/tests/dependency_resolver/transaction_test.rs +++ b/crates/shirabe/tests/dependency_resolver/transaction_test.rs @@ -1 +1,10 @@ //! ref: composer/tests/Composer/Test/DependencyResolver/TransactionTest.php + +// Transaction::new sorts operations via shirabe_php_shim::uasort_map, which is todo!(). +// The fixture also calls setRequires/setProvides on non-root packages, which the public +// handle API does not allow, so the scenario cannot be expressed faithfully yet. +#[test] +#[ignore = "Transaction::new reaches uasort_map (todo!()); fixture needs link setters on non-root packages"] +fn test_transaction_generation_and_sorting() { + todo!() +} diff --git a/crates/shirabe/tests/question/main.rs b/crates/shirabe/tests/question/main.rs new file mode 100644 index 0000000..d3f105a --- /dev/null +++ b/crates/shirabe/tests/question/main.rs @@ -0,0 +1 @@ +mod strict_confirmation_question_test; diff --git a/crates/shirabe/tests/question/strict_confirmation_question_test.rs b/crates/shirabe/tests/question/strict_confirmation_question_test.rs index e5a3299..9045461 100644 --- a/crates/shirabe/tests/question/strict_confirmation_question_test.rs +++ b/crates/shirabe/tests/question/strict_confirmation_question_test.rs @@ -1 +1,23 @@ //! ref: composer/tests/Composer/Test/Question/StrictConfirmationQuestionTest.php + +// These drive StrictConfirmationQuestion through Symfony's QuestionHelper::ask using +// ArrayInput/StreamOutput, none of which are ported. The question's normalizer and +// validator are private, so they cannot be exercised directly either. + +#[test] +#[ignore = "needs Symfony QuestionHelper::ask with ArrayInput/StreamOutput, which are not ported"] +fn test_ask_confirmation_bad_answer() { + todo!() +} + +#[test] +#[ignore = "needs Symfony QuestionHelper::ask with ArrayInput/StreamOutput, which are not ported"] +fn test_ask_confirmation() { + todo!() +} + +#[test] +#[ignore = "needs Symfony QuestionHelper::ask with ArrayInput/StreamOutput, which are not ported"] +fn test_ask_confirmation_with_custom_true_and_false_answer() { + todo!() +} |
