chore(cleanup): Tidy-up and tweaks of Pest Parallel integration.

This commit is contained in:
Luke Downing
2023-02-13 12:25:00 +00:00
parent eb64113a3d
commit d57437ff02
4 changed files with 4 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -54,15 +54,6 @@ $bootPest = (static function (): void {
} }
} }
require_once __DIR__.'/../overrides/Runner/TestSuiteLoader.php';
require_once __DIR__.'/../overrides/Runner/Filter/NameFilterIterator.php';
/**
* PHPUnit has no understanding of "todo" tests, so the ProgressPrinter will not show
* TODO items by default. We use our own implementation here to add support for TODO.
*/
require_once __DIR__.'/../overrides/TextUI/Output/Default/ProgressPrinter/TestSkippedSubscriber.php';
assert(isset($getopt['status-file']) && is_string($getopt['status-file'])); assert(isset($getopt['status-file']) && is_string($getopt['status-file']));
$statusFile = fopen($getopt['status-file'], 'wb'); $statusFile = fopen($getopt['status-file'], 'wb');
assert(is_resource($statusFile)); assert(is_resource($statusFile));

View File

@ -19,7 +19,7 @@ use ReflectionClass;
/** /**
* @internal This class is not covered by the backward compatibility promise for PHPUnit * @internal This class is not covered by the backward compatibility promise for PHPUnit
* *
* This file is only overridden when using Pest Parallel. See /bin/worker.php for more information. * This file is overridden to allow Pest Parallel to show todo items in the progress output.
*/ */
final class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber final class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber
{ {

View File

@ -6,6 +6,7 @@ namespace Pest\Bootstrappers;
use Pest\Contracts\Bootstrapper; use Pest\Contracts\Bootstrapper;
use Pest\Exceptions\ShouldNotHappen; use Pest\Exceptions\ShouldNotHappen;
use Pest\Plugins\Parallel;
/** /**
* @internal * @internal
@ -20,6 +21,7 @@ final class BootOverrides implements Bootstrapper
private const FILES = [ private const FILES = [
'Runner/Filter/NameFilterIterator.php', 'Runner/Filter/NameFilterIterator.php',
'Runner/TestSuiteLoader.php', 'Runner/TestSuiteLoader.php',
'TextUI/Output/Default/ProgressPrinter/TestSkippedSubscriber.php',
]; ];
/** /**