diff --git a/src/WrapperRunner/SuiteLoader.php b/src/WrapperRunner/SuiteLoader.php index 19591ae5..27e8b04d 100644 --- a/src/WrapperRunner/SuiteLoader.php +++ b/src/WrapperRunner/SuiteLoader.php @@ -29,6 +29,7 @@ use function mt_srand; use function ob_get_clean; use function ob_start; +use function preg_quote; use function sprintf; use function str_starts_with; use function strlen; @@ -87,7 +88,7 @@ public function __construct( if ($test->providedData() !== []) { $dataName = $test->dataName(); if ($this->options->functional) { - $name = sprintf('/%s\s.*%s.*$/', $name, $dataName); + $name = sprintf('/%s%s$/', preg_quote($name, '/'), preg_quote($test->dataSetAsString(), '/')); } else { if (is_int($dataName)) { $name .= '#' . $dataName; diff --git a/test/Unit/WrapperRunner/WrapperRunnerTest.php b/test/Unit/WrapperRunner/WrapperRunnerTest.php index 8b3d71ec..91f151f9 100644 --- a/test/Unit/WrapperRunner/WrapperRunnerTest.php +++ b/test/Unit/WrapperRunner/WrapperRunnerTest.php @@ -631,7 +631,7 @@ public function testGroupOptionWithDataProviderAndCodeCoverageEnabled(): void * @see https://bugs.php.net/bug.php?id=77726 * @see https://github.com/php/php-src/pull/8114 */ - #[RequiresPhp('8.2')] + #[RequiresPhp('>=8.2')] public function testFunctionalParallelization(): void { $this->bareOptions['path'] = $this->fixture('function_parallelization_tests'); @@ -643,7 +643,7 @@ public function testFunctionalParallelization(): void Processes: 2 Runtime: PHP %s -.......... 10 / 10 (100%) +.................... 20 / 20 (100%) Time: %s, Memory: %s MB @@ -653,7 +653,7 @@ public function testFunctionalParallelization(): void self::assertSame(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode); } - #[RequiresPhp('8.2')] + #[RequiresPhp('>=8.2')] public function testSameBeginningOfName(): void { $this->bareOptions['path'] = $this->fixture('same_beginning_of_name'); @@ -675,7 +675,7 @@ public function testSameBeginningOfName(): void self::assertSame(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode); } - #[RequiresPhp('8.2')] + #[RequiresPhp('>=8.2')] public function testFunctionalParallelizationWithJunitLogging(): void { $outputFile = $this->tmpDir . DIRECTORY_SEPARATOR . 'test-output.xml'; @@ -692,7 +692,7 @@ public function testFunctionalParallelizationWithJunitLogging(): void Processes: 1 Runtime: PHP %s -.......... 10 / 10 (100%) +.................... 20 / 20 (100%) Time: %s, Memory: %s MB diff --git a/test/fixtures/function_parallelization_tests/FunctionalParallelizationTest.php b/test/fixtures/function_parallelization_tests/FunctionalParallelizationTest.php index cae2154f..c4cc3157 100644 --- a/test/fixtures/function_parallelization_tests/FunctionalParallelizationTest.php +++ b/test/fixtures/function_parallelization_tests/FunctionalParallelizationTest.php @@ -17,6 +17,14 @@ public static function dataProvider1(): array ['a', 'a'], ['b', 'b'], ['c', 'c'], + ['d', 'd'], + ['e', 'e'], + ['f', 'f'], + ['g', 'g'], + ['h', 'h'], + ['i', 'i'], + ['k', 'k'], + ['l', 'l'], ]; } @@ -27,6 +35,7 @@ public static function dataProvider2(): array 'test1 with spaces' => ['a', 'a'], "test2 with \0" => ['b', 'b'], 'test3' => ['c', 'c'], + 'Test\\Class\\Name' => ['d', 'd'], ]; }