From 72fc52bd8b4d82a827d50d74342b12668da9ad56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Tue, 5 Nov 2024 10:12:37 +0100 Subject: [PATCH] tests: Guard against Flex presence If the Flex plugin is installed on the machine, running tests locally will cause additional noise. --- e2e/scenario0/vendor-bin/ns1/composer.json | 3 ++- e2e/scenario0/vendor-bin/ns2/composer.json | 3 ++- e2e/scenario1/vendor-bin/ns1/composer.json | 3 ++- e2e/scenario1/vendor-bin/ns2/composer.json | 3 ++- e2e/scenario11/vendor-bin/ns1/composer.json | 3 ++- e2e/scenario3/vendor-bin/ns1/composer.json | 3 ++- e2e/scenario8/vendor-bin/ns1/composer.json | 3 ++- tests/EndToEndTest.php | 10 ++++++++++ 8 files changed, 24 insertions(+), 7 deletions(-) diff --git a/e2e/scenario0/vendor-bin/ns1/composer.json b/e2e/scenario0/vendor-bin/ns1/composer.json index 0967ef4..2c63c08 100644 --- a/e2e/scenario0/vendor-bin/ns1/composer.json +++ b/e2e/scenario0/vendor-bin/ns1/composer.json @@ -1 +1,2 @@ -{} +{ +} diff --git a/e2e/scenario0/vendor-bin/ns2/composer.json b/e2e/scenario0/vendor-bin/ns2/composer.json index 0967ef4..2c63c08 100644 --- a/e2e/scenario0/vendor-bin/ns2/composer.json +++ b/e2e/scenario0/vendor-bin/ns2/composer.json @@ -1 +1,2 @@ -{} +{ +} diff --git a/e2e/scenario1/vendor-bin/ns1/composer.json b/e2e/scenario1/vendor-bin/ns1/composer.json index 0967ef4..2c63c08 100644 --- a/e2e/scenario1/vendor-bin/ns1/composer.json +++ b/e2e/scenario1/vendor-bin/ns1/composer.json @@ -1 +1,2 @@ -{} +{ +} diff --git a/e2e/scenario1/vendor-bin/ns2/composer.json b/e2e/scenario1/vendor-bin/ns2/composer.json index 0967ef4..2c63c08 100644 --- a/e2e/scenario1/vendor-bin/ns2/composer.json +++ b/e2e/scenario1/vendor-bin/ns2/composer.json @@ -1 +1,2 @@ -{} +{ +} diff --git a/e2e/scenario11/vendor-bin/ns1/composer.json b/e2e/scenario11/vendor-bin/ns1/composer.json index 0967ef4..2c63c08 100644 --- a/e2e/scenario11/vendor-bin/ns1/composer.json +++ b/e2e/scenario11/vendor-bin/ns1/composer.json @@ -1 +1,2 @@ -{} +{ +} diff --git a/e2e/scenario3/vendor-bin/ns1/composer.json b/e2e/scenario3/vendor-bin/ns1/composer.json index 0967ef4..2c63c08 100644 --- a/e2e/scenario3/vendor-bin/ns1/composer.json +++ b/e2e/scenario3/vendor-bin/ns1/composer.json @@ -1 +1,2 @@ -{} +{ +} diff --git a/e2e/scenario8/vendor-bin/ns1/composer.json b/e2e/scenario8/vendor-bin/ns1/composer.json index 0967ef4..2c63c08 100644 --- a/e2e/scenario8/vendor-bin/ns1/composer.json +++ b/e2e/scenario8/vendor-bin/ns1/composer.json @@ -1 +1,2 @@ -{} +{ +} diff --git a/tests/EndToEndTest.php b/tests/EndToEndTest.php index d45a685..6235fec 100644 --- a/tests/EndToEndTest.php +++ b/tests/EndToEndTest.php @@ -58,6 +58,16 @@ public function test_it_passes_the_e2e_test(string $scenarioPath): void if (file_exists($actualPath)) { $originalContent = file_get_contents($scenarioPath.'/actual.txt'); + $originalContent = str_replace( + "Symfony recipes are disabled: \"symfony/flex\" not found in the root composer.json\n\n", + '', + $originalContent + ); + $originalContent = preg_replace( + '/.+Symfony\\\\Flex.+\n/', + '', + $originalContent + ); } else { $originalContent = 'File was not created.'; }