fix: parallel status code

This commit is contained in:
Nuno Maduro
2023-02-25 17:42:24 +05:30
parent b54c24a589
commit 244087db27
4 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,6 @@ namespace PHPUnit\Runner\ResultCache;
use function array_keys; use function array_keys;
use function assert; use function assert;
use function Pest\version;
use const DIRECTORY_SEPARATOR; use const DIRECTORY_SEPARATOR;
use function dirname; use function dirname;
use function file_get_contents; use function file_get_contents;
@ -57,6 +56,7 @@ use function is_dir;
use function is_file; use function is_file;
use function json_decode; use function json_decode;
use function json_encode; use function json_encode;
use function Pest\version;
use PHPUnit\Framework\TestStatus\TestStatus; use PHPUnit\Framework\TestStatus\TestStatus;
use PHPUnit\Runner\DirectoryCannotBeCreatedException; use PHPUnit\Runner\DirectoryCannotBeCreatedException;
use PHPUnit\Runner\Exception; use PHPUnit\Runner\Exception;

View File

@ -317,9 +317,7 @@ final class WrapperRunner implements RunnerInterface
$testResultSum->testTriggeredPhpunitErrorEvents(), $testResultSum->testTriggeredPhpunitErrorEvents(),
$testResultSum->testTriggeredPhpunitWarningEvents(), $testResultSum->testTriggeredPhpunitWarningEvents(),
$testResultSum->testRunnerTriggeredDeprecationEvents(), $testResultSum->testRunnerTriggeredDeprecationEvents(),
array_values(array_filter($testResultSum->testRunnerTriggeredWarningEvents(), function ($event) { array_values(array_filter($testResultSum->testRunnerTriggeredWarningEvents(), fn ($event): bool => ! str_contains($event->message(), 'No tests found'))),
return ! str_contains($event->message(), 'No tests found');
})),
); );
$this->printer->printResults( $this->printer->printResults(

View File

@ -917,4 +917,4 @@
PASS Tests\Visual\Version PASS Tests\Visual\Version
✓ visual snapshot of help command output ✓ visual snapshot of help command output
Tests: 4 incomplete, 4 todos, 18 skipped, 634 passed (1559 assertions) Tests: 4 incomplete, 4 todos, 18 skipped, 634 passed (1560 assertions)

View File

@ -9,6 +9,8 @@ $run = function () {
$process->run(); $process->run();
expect($process->getExitCode())->toBe(0);
return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput()); return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput());
}; };