blob: 86f6f35baa2b751fd0a269d4a61020e548099ea0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
//! 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_symfony_console::input::InputValue;
use shirabe_symfony_console::input::ParameterName;
#[test]
#[serial]
fn test_about() {
let shirabe_version = composer::SHIRABE_VERSION;
let composer_version = composer::VERSION;
let mut app_tester = get_application_tester();
let status_code = app_tester
.run(
vec![(ParameterName::of("command"), InputValue::from("about"))],
RunOptions::default(),
)
.unwrap();
assert_eq!(0, status_code);
assert!(app_tester.get_display().contains(&format!(
"Shirabe - Dependency Manager for PHP - version {shirabe_version} (based on Composer {composer_version})"
)));
assert!(app_tester.get_display().contains(
"Shirabe 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.")
);
}
|