diff --git a/overrides/Runner/ResultCache/DefaultResultCache.php b/overrides/Runner/ResultCache/DefaultResultCache.php index d3438e00..640c3971 100644 --- a/overrides/Runner/ResultCache/DefaultResultCache.php +++ b/overrides/Runner/ResultCache/DefaultResultCache.php @@ -47,7 +47,6 @@ namespace PHPUnit\Runner\ResultCache; use function array_keys; use function assert; -use function Pest\version; use const DIRECTORY_SEPARATOR; use function dirname; use function file_get_contents; @@ -57,6 +56,7 @@ use function is_dir; use function is_file; use function json_decode; use function json_encode; +use function Pest\version; use PHPUnit\Framework\TestStatus\TestStatus; use PHPUnit\Runner\DirectoryCannotBeCreatedException; use PHPUnit\Runner\Exception; @@ -190,6 +190,6 @@ final class DefaultResultCache implements ResultCache */ private function cacheVersion(): string { - return 'pest_' . version(); + return 'pest_'.version(); } } diff --git a/src/Plugins/Parallel/Paratest/WrapperRunner.php b/src/Plugins/Parallel/Paratest/WrapperRunner.php index 3f0a1835..5c3bf2e4 100644 --- a/src/Plugins/Parallel/Paratest/WrapperRunner.php +++ b/src/Plugins/Parallel/Paratest/WrapperRunner.php @@ -317,9 +317,7 @@ final class WrapperRunner implements RunnerInterface $testResultSum->testTriggeredPhpunitErrorEvents(), $testResultSum->testTriggeredPhpunitWarningEvents(), $testResultSum->testRunnerTriggeredDeprecationEvents(), - array_values(array_filter($testResultSum->testRunnerTriggeredWarningEvents(), function ($event) { - return ! str_contains($event->message(), 'No tests found'); - })), + array_values(array_filter($testResultSum->testRunnerTriggeredWarningEvents(), fn ($event): bool => ! str_contains($event->message(), 'No tests found'))), ); $this->printer->printResults( diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index cc563df2..81ae5e23 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -917,4 +917,4 @@ PASS Tests\Visual\Version ✓ visual snapshot of help command output - Tests: 4 incomplete, 4 todos, 18 skipped, 634 passed (1559 assertions) \ No newline at end of file + Tests: 4 incomplete, 4 todos, 18 skipped, 634 passed (1560 assertions) \ No newline at end of file diff --git a/tests/Visual/Parallel.php b/tests/Visual/Parallel.php index 5e83d922..1fbe0ed3 100644 --- a/tests/Visual/Parallel.php +++ b/tests/Visual/Parallel.php @@ -9,6 +9,8 @@ $run = function () { $process->run(); + expect($process->getExitCode())->toBe(0); + return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput()); };