Skip to content

Commit ec4defc

Browse files
committed
Fix test on Windows due to PHPStan Turbo
1 parent 505ee7e commit ec4defc

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎tests/Parallel/Command/WorkerCommandLineFactoryTest.php‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,14 @@ private function cleanUpEmptyQuoteExpectedCommandOutput(string $result): string
230230
private function normalizeExpectedCommandOutput(string $command): string
231231
{
232232
if ($this->isWindows()) {
233-
return str_replace("'", '"', $command);
233+
// the turbo arguments are escaped by escapeshellarg() already, keep the single quotes inside them
234+
$turboExtensionArguments = self::turboExtensionArguments();
235+
236+
return str_replace(
237+
str_replace("'", '"', $turboExtensionArguments),
238+
$turboExtensionArguments,
239+
str_replace("'", '"', $command)
240+
);
234241
}
235242

236243
return $command;

0 commit comments

Comments
 (0)