From f9c5e1bc8791accc1459f6c8e1cd452e4ce15d8f Mon Sep 17 00:00:00 2001 From: Axel Date: Mon, 19 Feb 2024 15:33:26 +0100 Subject: [PATCH] Change expected output for more exactly --- test/Unit/WrapperRunner/WrapperRunnerTest.php | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/test/Unit/WrapperRunner/WrapperRunnerTest.php b/test/Unit/WrapperRunner/WrapperRunnerTest.php index 969d4ece..9480a20c 100644 --- a/test/Unit/WrapperRunner/WrapperRunnerTest.php +++ b/test/Unit/WrapperRunner/WrapperRunnerTest.php @@ -633,8 +633,18 @@ public function testFunctionalParallelization(): void $this->bareOptions['--functional'] = true; $runnerResult = $this->runRunner(); - self::assertStringContainsString('..........', $runnerResult->output); - self::assertStringContainsString('10 / 10 (100%)', $runnerResult->output); + + $expectedOutput = <<<'EOF' +Processes: 2 +Runtime: PHP %s + +.......... 10 / 10 (100%) + +Time: %s, Memory: %s MB + +OK%a +EOF; + self::assertStringMatchesFormat($expectedOutput, $runnerResult->output); self::assertSame(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode); } @@ -650,8 +660,18 @@ public function testFunctionalParallelizationWithJunitLogging(): void $this->bareOptions['--log-junit'] = $outputFile; $runnerResult = $this->runRunner(); - self::assertStringContainsString('..........', $runnerResult->output); - self::assertStringContainsString('10 / 10 (100%)', $runnerResult->output); + + $expectedOutput = <<<'EOF' +Processes: 1 +Runtime: PHP %s + +.......... 10 / 10 (100%) + +Time: %s, Memory: %s MB + +OK%a +EOF; + self::assertStringMatchesFormat($expectedOutput, $runnerResult->output); self::assertSame(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode); }