diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-01 03:08:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-01 03:08:13 +0900 |
| commit | 66723bc24f9eef827b239d3406ba41256ec6b5b8 (patch) | |
| tree | 2ee30910a17d3c1d5c6bba2b020c2ca0ff8f2669 /crates/shirabe/src/console | |
| parent | 925b2ee998a87dc20e1eced18040ea649bfed507 (diff) | |
| download | php-shirabe-66723bc24f9eef827b239d3406ba41256ec6b5b8.tar.gz php-shirabe-66723bc24f9eef827b239d3406ba41256ec6b5b8.tar.zst php-shirabe-66723bc24f9eef827b239d3406ba41256ec6b5b8.zip | |
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/console')
| -rw-r--r-- | crates/shirabe/src/console/application.rs | 14 |
1 files changed, 14 insertions, 0 deletions
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<std::cell::RefCell<dyn BaseApplication>> { 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<bool>, + disable_scripts: Option<bool>, + ) -> anyhow::Result<Option<PartialComposerHandle>> { + self.0 + .borrow_mut() + .get_composer(required, disable_plugins, disable_scripts) + } } impl ApplicationHandle { |
