From bdb7dd19924970dc42848714b042804b474398b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Sun, 15 Oct 2023 00:23:54 +0200 Subject: [PATCH] test: Update the fake Box version used Pick a non-existent generic version instead of an outdated one to avoid any confusion. Closes #928. --- tests/Console/ApplicationTest.php | 4 +-- tests/Console/Command/CompileTest.php | 42 +++++++++++++-------------- tests/Console/DisplayNormalizer.php | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/Console/ApplicationTest.php b/tests/Console/ApplicationTest.php index e6af1dc7f..8cc7e0a44 100644 --- a/tests/Console/ApplicationTest.php +++ b/tests/Console/ApplicationTest.php @@ -42,7 +42,7 @@ public function test_it_can_display_the_version_when_no_specific_version_is_give self::assertSame(ExitCode::SUCCESS, $appTester->getStatusCode()); $expected = <<<'EOF' - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a EOF; @@ -102,7 +102,7 @@ public function test_get_helper_menu(): void /_____/\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a Usage: command [options] [arguments] diff --git a/tests/Console/Command/CompileTest.php b/tests/Console/Command/CompileTest.php index 7afba068a..09cc35199 100644 --- a/tests/Console/Command/CompileTest.php +++ b/tests/Console/Command/CompileTest.php @@ -240,7 +240,7 @@ public function test_it_can_build_a_phar_file(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -427,7 +427,7 @@ public function test_it_can_build_a_phar_without_any_configuration(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading without a configuration file. @@ -598,7 +598,7 @@ public function test_it_can_build_a_phar_with_complete_mapping(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -850,7 +850,7 @@ public function test_it_can_build_a_phar_file_in_verbose_mode(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -978,7 +978,7 @@ public function test_it_can_build_a_phar_file_in_very_verbose_mode(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -1116,7 +1116,7 @@ public function test_it_can_build_a_phar_file_in_debug_mode(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -1179,7 +1179,7 @@ public function test_it_can_build_a_phar_file_in_debug_mode(): void // PHP extensions: Core,date // OS: Darwin / 17.7.0 // Command: bin/phpunit - // Box: 3.x-dev@27df576 + // Box: x.x-dev@27df576 // Time: 2018-05-24T20:59:15+00:00 // @@ -1296,7 +1296,7 @@ public function test_it_can_build_a_phar_file_in_debug_mode(): void 'Box: %s', get_box_version(), ), - 'Box: 3.x-dev@27df576', + 'Box: x.x-dev@27df576', $actualDumpedConfig, ); @@ -1600,7 +1600,7 @@ public function test_it_can_build_a_phar_overwriting_an_existing_one_in_verbose_ /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -1867,7 +1867,7 @@ public function test_it_can_build_a_phar_with_a_custom_banner(): void /_____/\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -1936,7 +1936,7 @@ public function test_it_can_build_a_phar_with_a_stub_file(): void /_____/\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2005,7 +2005,7 @@ public function test_it_can_build_a_phar_with_the_default_stub_file(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2082,7 +2082,7 @@ public function test_it_can_build_a_phar_without_a_main_script(): void /_____/\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2159,7 +2159,7 @@ public function test_it_can_build_an_empty_phar(): void /_____/\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2236,7 +2236,7 @@ public function test_it_can_build_a_phar_with_compressed_code(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2316,7 +2316,7 @@ public function test_it_can_build_a_phar_in_a_non_existent_directory(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2477,7 +2477,7 @@ public function test_it_can_build_a_phar_file_without_a_shebang_line(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2571,7 +2571,7 @@ public function test_it_can_build_a_phar_with_an_output_which_does_not_have_a_ph /_____/\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2790,7 +2790,7 @@ public function test_it_displays_recommendations_and_warnings(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2867,7 +2867,7 @@ public function test_it_skips_the_compression_when_in_dev_mode(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". @@ -2941,7 +2941,7 @@ public function test_it_can_generate_a_phar_with_docker(): void /_____/\\____/_/|_| - Box version 3.x-dev@151e40a + Box version x.x-dev@151e40a // Loading the configuration file "/path/to/box.json.dist". diff --git a/tests/Console/DisplayNormalizer.php b/tests/Console/DisplayNormalizer.php index eaf6e7a9a..8dd2c22cc 100644 --- a/tests/Console/DisplayNormalizer.php +++ b/tests/Console/DisplayNormalizer.php @@ -63,7 +63,7 @@ public static function createReplaceBoxVersionNormalizer(): callable { return static fn (string $output): string => preg_replace( '/Box version .+@[a-z\d]{7}/', - 'Box version 3.x-dev@151e40a', + 'Box version x.x-dev@151e40a', $output, ); }