aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/command/run_script_command_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-12 01:20:33 +0900
committernsfisis <nsfisis@gmail.com>2026-08-12 01:20:33 +0900
commit3e2613f70ebdb441269556d1080a69a1f21a4f7d (patch)
treec1f60a8d5deb5518506d7d59674c953957dc0990 /crates/shirabe/tests/command/run_script_command_test.rs
parent0779bfe8c7b5ee22034d552477cac54e8ae2895f (diff)
downloadphp-shirabe-3e2613f70ebdb441269556d1080a69a1f21a4f7d.tar.gz
php-shirabe-3e2613f70ebdb441269556d1080a69a1f21a4f7d.tar.zst
php-shirabe-3e2613f70ebdb441269556d1080a69a1f21a4f7d.zip
test: drop stale #[ignore]s and rewrite the run-script reasons
Measuring every ignored test with `cargo test --workspace --no-fail-fast -- --ignored` turned up 11 that pass today; their reasons named todo!()s and gaps that have since been implemented. The two run_script_command_test cases still fail, but not for the reason given: the user's Command class is imported and executed, and what is missing is only a way to observe it, since PhpCommandProxy::run forwards the run to the worker-side console application. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/command/run_script_command_test.rs')
-rw-r--r--crates/shirabe/tests/command/run_script_command_test.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/crates/shirabe/tests/command/run_script_command_test.rs b/crates/shirabe/tests/command/run_script_command_test.rs
index 6c7f45c8..992fc6e2 100644
--- a/crates/shirabe/tests/command/run_script_command_test.rs
+++ b/crates/shirabe/tests/command/run_script_command_test.rs
@@ -124,7 +124,11 @@ fn test_can_define_aliases() {
/// ref: RunScriptCommandTest::testExecutionOfSimpleSymfonyCommand
#[test]
#[serial]
-#[ignore = "invoking the script name as a top-level composer command needs Application::do_run to import the user's PHP Command class as a live application command, which is a todo!() in application.rs, and the worker writes to inherited stdio the in-process application tester cannot capture"]
+#[ignore = "PhpCommandProxy::run hands the whole run to the worker-side console application, so the \
+ user's Command writes to the stdio the worker inherited and the in-process application \
+ tester's buffer stays empty. The worker is also a per-process singleton that keeps the \
+ working directory it was spawned in, so the relative psr-4 path this test's autoload \
+ config produces ('./MyCommand.php') only resolves when the test runs first in the binary"]
fn test_execution_of_simple_symfony_command() {
let description = "Sample description for test command";
let tear_down = init_temp_composer(
@@ -245,7 +249,11 @@ class MyCommand extends Command
/// ref: RunScriptCommandTest::testExecutionOfSymfonyCommandWithConfiguration
#[test]
#[serial]
-#[ignore = "invoking the script name as a top-level composer command needs Application::do_run to import the user's PHP Command class as a live application command, which is a todo!() in application.rs, and the worker writes to inherited stdio the in-process application tester cannot capture"]
+#[ignore = "PhpCommandProxy::run hands the whole run to the worker-side console application, so the \
+ user's Command writes to the stdio the worker inherited and the in-process application \
+ tester's buffer stays empty. The worker is also a per-process singleton that keeps the \
+ working directory it was spawned in, so the relative psr-4 path this test's autoload \
+ config produces ('./MyCommand.php') only resolves when the test runs first in the binary"]
fn test_execution_of_symfony_command_with_configuration() {
let cmd_name = "custom-cmd-123";
let cmd_alias = format!("{}-alias", cmd_name);