mirror of
https://github.com/pestphp/pest.git
synced 2026-03-05 23:37:22 +01:00
add config loader to read phpunit file and get the tests directory or fallback
This commit is contained in:
5
bin/pest
5
bin/pest
@ -2,6 +2,7 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use Pest\Actions\ValidatesEnvironment;
|
||||
use Pest\ConfigLoader;
|
||||
use Pest\Support\Container;
|
||||
use Pest\Kernel;
|
||||
use Pest\TestSuite;
|
||||
@ -28,7 +29,9 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
$rootPath = dirname($autoloadPath, 2);
|
||||
$argv = new ArgvInput();
|
||||
|
||||
$testSuite = TestSuite::getInstance($rootPath, $argv->getParameterOption('--test-directory', 'tests'));
|
||||
$phpunitConfig = new ConfigLoader($rootPath);
|
||||
|
||||
$testSuite = TestSuite::getInstance($rootPath, $argv->getParameterOption('--test-directory', $phpunitConfig->getTestsDirectory()));
|
||||
|
||||
$isDecorated = $argv->getParameterOption('--colors', 'always') !== 'never';
|
||||
$output = new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, $isDecorated);
|
||||
|
||||
Reference in New Issue
Block a user