fix: Pest.php file not loaded in certain environments

This commit is contained in:
Nuno Maduro
2023-03-20 17:34:42 +00:00
parent 6071d86ac6
commit b887116e5c
5 changed files with 3 additions and 137 deletions

View File

@ -1,7 +1,6 @@
#!/usr/bin/env php
<?php declare(strict_types=1);
use Pest\ConfigLoader;
use Pest\Kernel;
use Pest\Panic;
use Pest\TestCaseFilters\GitDirtyTestCaseFilter;
@ -71,7 +70,7 @@ use Symfony\Component\Console\Output\ConsoleOutput;
$testSuite = TestSuite::getInstance(
$rootPath,
$input->getParameterOption('--test-directory', (new ConfigLoader($rootPath))->getTestsDirectory()),
$input->getParameterOption('--test-directory', 'tests'),
);
if ($dirty) {

View File

@ -4,7 +4,6 @@ declare(strict_types=1);
use ParaTest\WrapperRunner\ApplicationForWrapperWorker;
use ParaTest\WrapperRunner\WrapperWorker;
use Pest\ConfigLoader;
use Pest\Kernel;
use Pest\Plugins\Actions\CallsHandleArguments;
use Pest\TestSuite;
@ -18,7 +17,7 @@ $bootPest = (static function (): void {
$rootPath = dirname(PHPUNIT_COMPOSER_INSTALL, 2);
$testSuite = TestSuite::getInstance($rootPath, $workerArgv->getParameterOption(
'--test-directory',
(new ConfigLoader($rootPath))->getTestsDirectory()
'tests'
));
$input = new ArgvInput();