diff options
Diffstat (limited to 'crates/shirabe/tests/command')
| -rw-r--r-- | crates/shirabe/tests/command/about_command_test.rs | 7 | ||||
| -rw-r--r-- | crates/shirabe/tests/command/validate_command_test.rs | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/crates/shirabe/tests/command/about_command_test.rs b/crates/shirabe/tests/command/about_command_test.rs index bb726cf8..52e42a1d 100644 --- a/crates/shirabe/tests/command/about_command_test.rs +++ b/crates/shirabe/tests/command/about_command_test.rs @@ -8,7 +8,8 @@ use shirabe_php_shim::PhpMixed; #[test] #[serial] fn test_about() { - let composer_version = composer::get_version(); + let shirabe_version = composer::SHIRABE_VERSION; + let composer_version = composer::VERSION; let mut app_tester = get_application_tester(); let status_code = app_tester .run( @@ -19,11 +20,11 @@ fn test_about() { assert_eq!(0, status_code); assert!(app_tester.get_display().contains(&format!( - "Composer - Dependency Manager for PHP - version {composer_version}" + "Shirabe - Dependency Manager for PHP - version {shirabe_version} (based on Composer {composer_version})" ))); assert!(app_tester.get_display().contains( - "Composer is a dependency manager tracking local dependencies of your projects and libraries." + "Shirabe is a dependency manager tracking local dependencies of your projects and libraries." )); assert!( app_tester diff --git a/crates/shirabe/tests/command/validate_command_test.rs b/crates/shirabe/tests/command/validate_command_test.rs index 8e78dfe7..67370df0 100644 --- a/crates/shirabe/tests/command/validate_command_test.rs +++ b/crates/shirabe/tests/command/validate_command_test.rs @@ -69,7 +69,7 @@ fn provide_validate_tests() -> Vec<ValidateCase> { name: "validation passing", composer_json: minimal_valid_configuration(), command: vec![], - expected: "<warning>Composer could not detect the root package (test/suite) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version</warning>\n<warning>Composer could not detect the root package (test/suite) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version</warning>\n./composer.json is valid", + expected: "<warning>Shirabe could not detect the root package (test/suite) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version</warning>\n<warning>Shirabe could not detect the root package (test/suite) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version</warning>\n./composer.json is valid", }, ValidateCase { // WORDING NOTE: upstream asserts justinrainbow's property-prefixed strings @@ -142,7 +142,7 @@ fn test_with_composer_lock() { .run(validate_input(vec![]), RunOptions::default()) .unwrap(); - let expected = "<warning>Composer could not detect the root package (test/suite) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version</warning>\n<warning>Composer could not detect the root package (test/suite) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version</warning>\n./composer.json is valid but your composer.lock has some errors\n# Lock file errors\n- Required package \"root/req\" is not present in the lock file.\nThis usually happens when composer files are incorrectly merged or the composer.json file is manually edited.\nRead more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md\nand prefer using the \"require\" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r"; + let expected = "<warning>Shirabe could not detect the root package (test/suite) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version</warning>\n<warning>Shirabe could not detect the root package (test/suite) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version</warning>\n./composer.json is valid but your composer.lock has some errors\n# Lock file errors\n- Required package \"root/req\" is not present in the lock file.\nThis usually happens when composer files are incorrectly merged or the composer.json file is manually edited.\nRead more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md\nand prefer using the \"require\" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r"; assert_eq!(expected.trim(), app_tester.get_display().trim()); |
