Skip to content

Commit

Permalink
Merge pull request #203 from olivernybroe/HelpCommand
Browse files Browse the repository at this point in the history
Add Pest version to help command
  • Loading branch information
olivernybroe authored Oct 8, 2020
2 parents 4fd5c0e + 896317a commit d1b61a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
}

0 comments on commit d1b61a3

Please sign in to comment.