diff --git a/src/WrapperRunner/SuiteLoader.php b/src/WrapperRunner/SuiteLoader.php index c14531ab..19591ae5 100644 --- a/src/WrapperRunner/SuiteLoader.php +++ b/src/WrapperRunner/SuiteLoader.php @@ -95,6 +95,8 @@ public function __construct( $name .= '@' . $dataName; } } + } else { + $name = sprintf('/%s$/', $name); } $tests[] = "$file\0$name"; diff --git a/test/Unit/WrapperRunner/WrapperRunnerTest.php b/test/Unit/WrapperRunner/WrapperRunnerTest.php index 9480a20c..43651753 100644 --- a/test/Unit/WrapperRunner/WrapperRunnerTest.php +++ b/test/Unit/WrapperRunner/WrapperRunnerTest.php @@ -642,6 +642,28 @@ public function testFunctionalParallelization(): void Time: %s, Memory: %s MB +OK%a +EOF; + self::assertStringMatchesFormat($expectedOutput, $runnerResult->output); + self::assertSame(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode); + } + + #[RequiresPhp('8.2')] + public function testSameBeginningOfName(): void + { + $this->bareOptions['path'] = $this->fixture('same_beginning_of_name'); + $this->bareOptions['--functional'] = true; + + $runnerResult = $this->runRunner(); + + $expectedOutput = <<<'EOF' +Processes: 2 +Runtime: PHP %s + +.... 4 / 4 (100%) + +Time: %s, Memory: %s MB + OK%a EOF; self::assertStringMatchesFormat($expectedOutput, $runnerResult->output); diff --git a/test/fixtures/same_beginning_of_name/SameBeginningOfNameTest.php b/test/fixtures/same_beginning_of_name/SameBeginningOfNameTest.php new file mode 100644 index 00000000..b8b4214e --- /dev/null +++ b/test/fixtures/same_beginning_of_name/SameBeginningOfNameTest.php @@ -0,0 +1,31 @@ +