mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
WIP
This commit is contained in:
committed by
Nuno Maduro
parent
d69f61c8d3
commit
48309931ef
30
src/Plugins/Parallel/Handlers/Parallel.php
Normal file
30
src/Plugins/Parallel/Handlers/Parallel.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user