From 3cebb7421d12cb9f1373a3d802d408899f594983 Mon Sep 17 00:00:00 2001 From: Sandro Gehri Date: Thu, 21 Aug 2025 22:04:59 +0200 Subject: [PATCH] Filter out coverage-related arguments from the original test process arguments --- src/MutationTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MutationTest.php b/src/MutationTest.php index 5a0ab0c..2ac6a89 100644 --- a/src/MutationTest.php +++ b/src/MutationTest.php @@ -81,10 +81,13 @@ public function start(array $coveredLines, Configuration $configuration, array $ $envs['LARAVEL_PARALLEL_TESTING'] = 1; } + // remove coverage arguments from the original arguments + $filteredArguments = array_filter($originalArguments, fn (string $argument): bool => ! str_starts_with($argument, '--coverage')); + // TODO: filter arguments to remove unnecessary stuff (Teamcity, Coverage, etc.) $process = new Process( command: [ - ...$originalArguments, + ...$filteredArguments, '--bail', '--filter="'.implode('|', $filters).'"', ],