mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Update plugin interfaces and instantiate container
This commit is contained in:
9
bin/pest
9
bin/pest
@ -3,8 +3,10 @@
|
||||
|
||||
use Pest\Actions\ValidatesEnvironment;
|
||||
use Pest\Console\Command;
|
||||
use Pest\Support\Container;
|
||||
use Pest\TestSuite;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
(static function () {
|
||||
// Used when Pest is required using composer.
|
||||
@ -24,8 +26,13 @@ use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
$rootPath = getcwd();
|
||||
|
||||
$testSuite = TestSuite::getInstance($rootPath);
|
||||
$output = new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, true);
|
||||
|
||||
$container = Container::getInstance();
|
||||
$container->add(TestSuite::class, $testSuite);
|
||||
$container->add(OutputInterface::class, $output);
|
||||
|
||||
ValidatesEnvironment::in($testSuite);
|
||||
|
||||
exit((new Command($testSuite, new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, true)))->run($_SERVER['argv']));
|
||||
exit($container->get(Command::class)->run($_SERVER['argv']));
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user