mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 10:17:23 +01:00
WIP
This commit is contained in:
committed by
Nuno Maduro
parent
dd840f8861
commit
a34001faf0
@ -37,17 +37,17 @@ final class Laravel
|
||||
|
||||
private function setLaravelParallelRunner(): void
|
||||
{
|
||||
if (!method_exists(ParallelRunner::class, 'resolveRunnerUsing')) {
|
||||
if (! method_exists(ParallelRunner::class, 'resolveRunnerUsing')) {
|
||||
exit('Using parallel with Pest requires Laravel v8.55.0 or higher.');
|
||||
}
|
||||
|
||||
ParallelRunner::resolveRunnerUsing(fn(Options $options, OutputInterface $output): RunnerInterface => new WrapperRunner($options, $output));
|
||||
ParallelRunner::resolveRunnerUsing(fn (Options $options, OutputInterface $output): RunnerInterface => new WrapperRunner($options, $output));
|
||||
}
|
||||
|
||||
private static function isALaravelApplication(): bool
|
||||
{
|
||||
return class_exists(\Illuminate\Foundation\Application::class)
|
||||
&& class_exists(\Illuminate\Testing\ParallelRunner::class)
|
||||
&& !class_exists(\Orchestra\Testbench\TestCase::class);
|
||||
&& ! class_exists(\Orchestra\Testbench\TestCase::class);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ namespace Pest\Plugins\Parallel\Handlers;
|
||||
|
||||
use Pest\Plugins\Concerns\HandleArguments;
|
||||
use Pest\Plugins\Parallel\Paratest\WrapperRunner;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -14,6 +13,7 @@ use Symfony\Component\Console\Input\ArgvInput;
|
||||
final class Parallel
|
||||
{
|
||||
use HandleArguments;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
@ -27,6 +27,6 @@ final class Parallel
|
||||
{
|
||||
$args = array_reduce(self::ARGS_TO_REMOVE, fn ($args, $arg): array => $this->popArgument($arg, $args), $args);
|
||||
|
||||
return $this->pushArgument('--runner=' . WrapperRunner::class, $args);
|
||||
return $this->pushArgument('--runner='.WrapperRunner::class, $args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user