ParallelRunner.php
TLDR
The file ParallelRunner.php
provides a class ParallelRunner
that allows running test suites in parallel.
Classes
ParallelRunner
The ParallelRunner
class is responsible for running test suites in parallel. It conditionally implements either the \ParaTest\RunnerInterface
interface or the \ParaTest\Runners\PHPUnit\RunnerInterface
interface based on whether the ParaTest\RunnerInterface
class exists. The class makes use of the RunsInParallel
trait. It provides a run
method that executes the test suite.
<?php
namespace Illuminate\Testing;
use Illuminate\Testing\Concerns\RunsInParallel;
if (interface_exists(\ParaTest\RunnerInterface::class)) {
class ParallelRunner implements \ParaTest\RunnerInterface
{
use RunsInParallel;
/**
* Runs the test suite.
*
* @return int
*/
public function run(): int
{
return $this->execute();
}
}
} else {
class ParallelRunner implements \ParaTest\Runners\PHPUnit\RunnerInterface
{
use RunsInParallel;
/**
* Runs the test suite.
*
* @return void
*/
public function run(): void
{
$this->execute();
}
}
}