This commit is contained in:
Luke Downing
2023-02-06 16:43:58 +00:00
committed by Nuno Maduro
parent d69f61c8d3
commit 48309931ef
6 changed files with 459 additions and 1 deletions

View File

@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace Pest\Plugins\Parallel\Handlers;
use Pest\Plugins\Concerns\HandleArguments;
use Pest\Plugins\Parallel\Paratest\WrapperRunner;
use Symfony\Component\Console\Input\ArgvInput;
/**
* @internal
*/
final class Parallel
{
use HandleArguments;
public function handle(array $args): array
{
$argsToRemove = [
'--parallel',
'-p',
'--no-output',
];
$args = array_reduce($argsToRemove, fn ($args, $arg) => $this->popArgument($arg, $args), $args);
return $this->pushArgument('--runner=' . WrapperRunner::class, $args);
}
}