From 896317ac97a2a40e4860dd980cc24631881a4e73 Mon Sep 17 00:00:00 2001 From: Oliver Nybroe Date: Wed, 7 Oct 2020 08:50:29 +0200 Subject: [PATCH] Add Pest version to help command --- src/Console/Command.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Console/Command.php b/src/Console/Command.php index d74813726..0a2f9cf2a 100644 --- a/src/Console/Command.php +++ b/src/Console/Command.php @@ -11,6 +11,8 @@ use Pest\Contracts\Plugins\AddsOutput; use Pest\Contracts\Plugins\HandlesArguments; use Pest\Plugin\Loader; +use Pest\Plugins\Version; +use Pest\Support\Container; use Pest\TestSuite; use PHPUnit\Framework\TestSuite as BaseTestSuite; use PHPUnit\TextUI\Command as BaseCommand; @@ -139,4 +141,12 @@ public function run(array $argv, bool $exit = true): int exit($result); } + + protected function showHelp(): void + { + /** @var Version $version */ + $version = Container::getInstance()->get(Version::class); + $version->handleArguments(['--version']); + parent::showHelp(); + } }