Skip to content

Commit

Permalink
tests: Guard against Flex presence
Browse files Browse the repository at this point in the history
If the Flex plugin is installed on the machine, running tests locally
will cause additional noise.
  • Loading branch information
theofidry committed Nov 5, 2024
1 parent bbe4925 commit 72fc52b
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 7 deletions.
3 changes: 2 additions & 1 deletion e2e/scenario0/vendor-bin/ns1/composer.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{
}
3 changes: 2 additions & 1 deletion e2e/scenario0/vendor-bin/ns2/composer.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{
}
3 changes: 2 additions & 1 deletion e2e/scenario1/vendor-bin/ns1/composer.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{
}
3 changes: 2 additions & 1 deletion e2e/scenario1/vendor-bin/ns2/composer.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{
}
3 changes: 2 additions & 1 deletion e2e/scenario11/vendor-bin/ns1/composer.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{
}
3 changes: 2 additions & 1 deletion e2e/scenario3/vendor-bin/ns1/composer.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{
}
3 changes: 2 additions & 1 deletion e2e/scenario8/vendor-bin/ns1/composer.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{
}
10 changes: 10 additions & 0 deletions tests/EndToEndTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
}
Expand Down

0 comments on commit 72fc52b

Please sign in to comment.