mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Improvements
This commit is contained in:
@ -40,7 +40,7 @@ final class PestRunnerWorker
|
||||
$args = array_merge(
|
||||
$args,
|
||||
$this->executableTest->commandArguments(
|
||||
'/Users/luke/Packages/pest/bin/pest',
|
||||
$this->getPestBinary(),
|
||||
$options->filtered(),
|
||||
$options->passthru()
|
||||
)
|
||||
@ -109,6 +109,17 @@ final class PestRunnerWorker
|
||||
}
|
||||
}
|
||||
|
||||
private function getPestBinary(): string
|
||||
{
|
||||
// Used when Pest is required using composer.
|
||||
$vendorPath = dirname(__DIR__, 7) . '/bin/pest';
|
||||
|
||||
// Used when Pest maintainers are running Pest tests.
|
||||
$localPath = dirname(__DIR__, 3) . '/bin/pest';
|
||||
|
||||
return file_exists($vendorPath) ? $vendorPath : $localPath;
|
||||
}
|
||||
|
||||
public function getWorkerCrashedException(?Throwable $previousException = null): WorkerCrashedException
|
||||
{
|
||||
return WorkerCrashedException::fromProcess(
|
||||
|
||||
@ -13,6 +13,7 @@ use ParaTest\Runners\PHPUnit\Options;
|
||||
use ParaTest\Runners\PHPUnit\ResultPrinter;
|
||||
use ParaTest\Runners\PHPUnit\RunnerInterface;
|
||||
use ParaTest\Runners\PHPUnit\SuiteLoader;
|
||||
use Pest\Actions\LoadStructure;
|
||||
use Pest\Factories\TestCaseFactory;
|
||||
use Pest\TestSuite;
|
||||
use PHPUnit\TextUI\TestRunner;
|
||||
@ -100,6 +101,8 @@ final class Runner implements RunnerInterface
|
||||
{
|
||||
$this->beforeLoadChecks();
|
||||
|
||||
LoadStructure::in(TestSuite::getInstance()->rootPath);
|
||||
|
||||
$loader->load();
|
||||
$this->loadPestSuite();
|
||||
|
||||
@ -327,6 +330,7 @@ final class Runner implements RunnerInterface
|
||||
private function loadPestSuite(): void
|
||||
{
|
||||
$pestTestSuite = TestSuite::getInstance();
|
||||
LoadStructure::in($pestTestSuite->rootPath);
|
||||
|
||||
$files = array_values(array_map(function (TestCaseFactory $factory): string {
|
||||
return $factory->filename;
|
||||
|
||||
Reference in New Issue
Block a user