diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-28 07:09:19 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-28 07:20:32 +0900 |
| commit | f74d43409220ac209d01367bfc40dbc2c85be252 (patch) | |
| tree | b541b40d7774ae78d19f2ad3756f01ac3efca7a2 /crates/shirabe/src/console/application.rs | |
| parent | db166f15682e9ac254370e176b1cda439689e6e7 (diff) | |
| download | php-shirabe-f74d43409220ac209d01367bfc40dbc2c85be252.tar.gz php-shirabe-f74d43409220ac209d01367bfc40dbc2c85be252.tar.zst php-shirabe-f74d43409220ac209d01367bfc40dbc2c85be252.zip | |
test(console): port DocumentationTest::testCommand
Add __base_application accessor on ApplicationHandle so the test can
build an ApplicationDescription the way console commands do.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/console/application.rs')
| -rw-r--r-- | crates/shirabe/src/console/application.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs index f3e4292..3e197a2 100644 --- a/crates/shirabe/src/console/application.rs +++ b/crates/shirabe/src/console/application.rs @@ -2577,6 +2577,13 @@ impl ApplicationHandle { pub fn set_catch_exceptions(&self, boolean: bool) { self.0.borrow_mut().set_catch_exceptions(boolean); } + + /// For testing only: exposes the application as a Symfony base-application handle, the way + /// console commands receive it via `getApplication()`, so tests can build an + /// `ApplicationDescription` over it. + pub fn __base_application(&self) -> std::rc::Rc<std::cell::RefCell<dyn BaseApplication>> { + self.0.clone() + } } impl ApplicationHandle { |
