From 66723bc24f9eef827b239d3406ba41256ec6b5b8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 1 Jul 2026 03:08:13 +0900 Subject: test(application): port two doRun script-command tests Port testNoPluginsDisablesPluginsWhenScriptCommandsExist and testScriptCommandTakesPriorityOverAbbreviatedBuiltinCommand. Both stay #[ignore]d because do_run panics at the script-registration todo!() (application.rs:2461) when composer.json has scripts. Add a test-only ApplicationHandle::__get_composer accessor so the first test's getPluginManager assertions can be expressed. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/console/application.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/shirabe/src/console/application.rs') diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs index a3b4df7..7c527c6 100644 --- a/crates/shirabe/src/console/application.rs +++ b/crates/shirabe/src/console/application.rs @@ -2582,6 +2582,20 @@ impl ApplicationHandle { pub fn __base_application(&self) -> std::rc::Rc> { self.0.clone() } + + /// For testing only: exposes the inner Application's `get_composer`, mirroring the public PHP + /// `$application->getComposer($required, $disablePlugins, $disableScripts)` so tests can inspect + /// the Composer instance created during do_run. + pub fn __get_composer( + &self, + required: bool, + disable_plugins: Option, + disable_scripts: Option, + ) -> anyhow::Result> { + self.0 + .borrow_mut() + .get_composer(required, disable_plugins, disable_scripts) + } } impl ApplicationHandle { -- cgit v1.3.1