mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 02:52:12 +02:00
wip
This commit is contained in:
@ -6,6 +6,7 @@ use ParaTest\WrapperRunner\ApplicationForWrapperWorker;
|
||||
use ParaTest\WrapperRunner\WrapperWorker;
|
||||
use Pest\Kernel;
|
||||
use Pest\Plugins\Actions\CallsHandleArguments;
|
||||
use Pest\Support\Container;
|
||||
use Pest\TestSuite;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
@ -58,6 +59,15 @@ $bootPest = (static function (): void {
|
||||
}
|
||||
}
|
||||
|
||||
$container = Container::getInstance();
|
||||
$rootPath = dirname(PHPUNIT_COMPOSER_INSTALL, 2);
|
||||
|
||||
foreach (Kernel::RESTARTERS as $restarterClass) {
|
||||
$restarter = $container->get($restarterClass);
|
||||
|
||||
$restarter->maybeRestart($rootPath, $_SERVER['argv']);
|
||||
}
|
||||
|
||||
assert(isset($getopt['status-file']) && is_string($getopt['status-file']));
|
||||
$statusFile = fopen($getopt['status-file'], 'wb');
|
||||
assert(is_resource($statusFile));
|
||||
|
||||
@ -19,6 +19,7 @@ use Pest\Plugins\Tia\Graph;
|
||||
use Pest\Plugins\Tia\JsModuleGraph;
|
||||
use Pest\Plugins\Tia\Recorder;
|
||||
use Pest\Plugins\Tia\ResultCollector;
|
||||
use Pest\Plugins\Tia\SourceScope;
|
||||
use Pest\Plugins\Tia\Storage;
|
||||
use Pest\Plugins\Tia\TableExtractor;
|
||||
use Pest\Plugins\Tia\WatchPatterns;
|
||||
@ -1407,7 +1408,7 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
|
||||
];
|
||||
|
||||
$projectRoot = TestSuite::getInstance()->rootPath;
|
||||
$testPaths = \Pest\Plugins\Tia\SourceScope::testPaths($projectRoot);
|
||||
$testPaths = SourceScope::testPaths($projectRoot);
|
||||
|
||||
if ($testPaths === []) {
|
||||
return false;
|
||||
|
||||
@ -69,7 +69,7 @@ final readonly class SourceScope
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string> Absolute, normalised paths to testsuite directories and files declared in phpunit.xml.
|
||||
* @return list<string> Absolute, normalised paths to testsuite directories and files declared in phpunit.xml.
|
||||
*/
|
||||
public static function testPaths(string $projectRoot): array
|
||||
{
|
||||
|
||||
@ -17,8 +17,8 @@ final readonly class TestPaths
|
||||
{
|
||||
/**
|
||||
* @param list<string> $directories Project-relative directory prefixes (no trailing slash).
|
||||
* @param list<string> $files Project-relative file paths.
|
||||
* @param list<string> $suffixes Filename suffixes (e.g. '.php').
|
||||
* @param list<string> $files Project-relative file paths.
|
||||
* @param list<string> $suffixes Filename suffixes (e.g. '.php').
|
||||
*/
|
||||
public function __construct(
|
||||
private array $directories,
|
||||
|
||||
Reference in New Issue
Block a user