From 99f3f882b8a9919a21a8f88866e0816c1cbe55a1 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sun, 18 Feb 2024 09:44:15 +0100 Subject: [PATCH] Use preg_qoute() escaping for --filter phpunit option --- .github/workflows/tests-levels-matrix.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-levels-matrix.php b/.github/workflows/tests-levels-matrix.php index ecdb0cb964..fae513cf8c 100644 --- a/.github/workflows/tests-levels-matrix.php +++ b/.github/workflows/tests-levels-matrix.php @@ -19,7 +19,7 @@ [$className, $testName] = explode('::', $testCaseName, 2); $fileName = 'tests/'. str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php'; - $filter = str_replace('\\', '\\\\', $testCaseName); + $filter = preg_quote($testCaseName); $testFilters[] = sprintf("%s --filter %s", escapeshellarg($fileName), escapeshellarg($filter)); }