diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-25 17:02:11 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-26 00:20:05 +0900 |
| commit | 3498bb1ca00ab7d051d296b8d482bea987a00fa4 (patch) | |
| tree | e10260e5816317f4547847e2a230ea1a87fb2448 /crates/shirabe/tests/command/about_command_test.rs | |
| parent | 291b43d132749a61918dca23acef1b639c5333a7 (diff) | |
| download | php-shirabe-3498bb1ca00ab7d051d296b8d482bea987a00fa4.tar.gz php-shirabe-3498bb1ca00ab7d051d296b8d482bea987a00fa4.tar.zst php-shirabe-3498bb1ca00ab7d051d296b8d482bea987a00fa4.zip | |
test: port 24 command/repository/package/util tests; add TlsHelper
Port command (9), util gitlab/forgejo/tls (6), package (6), repository (3)
tests. Implement TlsHelper. Fix porting bugs: config_command extra merge,
RootAliasPackage setters, ValidatingArrayLoader isset, repository_factory name
generation, forgejo exception code, version_parser error chaining.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/command/about_command_test.rs')
| -rw-r--r-- | crates/shirabe/tests/command/about_command_test.rs | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/crates/shirabe/tests/command/about_command_test.rs b/crates/shirabe/tests/command/about_command_test.rs index 591fbfa..bb726cf 100644 --- a/crates/shirabe/tests/command/about_command_test.rs +++ b/crates/shirabe/tests/command/about_command_test.rs @@ -1,7 +1,33 @@ //! ref: composer/tests/Composer/Test/Command/AboutCommandTest.php +use crate::test_case::{RunOptions, get_application_tester}; +use serial_test::serial; +use shirabe::composer; +use shirabe_php_shim::PhpMixed; + #[test] -#[ignore = "missing get_application_tester (ApplicationTester) infrastructure and Application::get_display/set_auto_exit"] +#[serial] fn test_about() { - todo!() + let composer_version = composer::get_version(); + let mut app_tester = get_application_tester(); + let status_code = app_tester + .run( + vec![(PhpMixed::from("command"), PhpMixed::from("about"))], + RunOptions::default(), + ) + .unwrap(); + assert_eq!(0, status_code); + + assert!(app_tester.get_display().contains(&format!( + "Composer - Dependency Manager for PHP - version {composer_version}" + ))); + + assert!(app_tester.get_display().contains( + "Composer is a dependency manager tracking local dependencies of your projects and libraries." + )); + assert!( + app_tester + .get_display() + .contains("See https://getcomposer.org/ for more information.") + ); } |
