This commit is contained in:
Luke Downing
2023-02-10 15:49:30 +00:00
committed by Nuno Maduro
parent 7fe7a01d43
commit 504fd04705
2 changed files with 9 additions and 0 deletions

View File

@ -8,6 +8,7 @@ use Pest\ConfigLoader;
use Pest\Kernel;
use Pest\Plugins\Actions\CallsHandleArguments;
use Pest\Support\Container;
use Pest\TestCaseMethodFilters\TodoTestCaseFilter;
use Pest\TestSuite;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputInterface;
@ -16,12 +17,18 @@ use Symfony\Component\Console\Output\OutputInterface;
$bootPest = (static function (): void {
$argv = new ArgvInput();
$originalArgv = new ArgvInput(json_decode($_SERVER['PEST_PARALLEL_ARGV']));
$rootPath = dirname(PHPUNIT_COMPOSER_INSTALL, 2);
$testSuite = TestSuite::getInstance(
$rootPath,
$argv->getParameterOption('--test-directory', (new ConfigLoader($rootPath))->getTestsDirectory()),
);
if ($originalArgv->hasParameterOption('--todo')) {
$testSuite->tests->addTestCaseMethodFilter(new TodoTestCaseFilter());
}
$output = new ConsoleOutput(OutputInterface::VERBOSITY_NORMAL, true);
$container = Container::getInstance();