mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Fixes --version and --help
This commit is contained in:
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Pest\Plugins\Version;
|
||||
use function Pest\version;
|
||||
use Symfony\Component\Console\Output\BufferedOutput;
|
||||
|
||||
it('outputs the version when --version is used', function () {
|
||||
$output = new BufferedOutput();
|
||||
$plugin = new Version($output);
|
||||
|
||||
$plugin->handleArguments(['foo', '--version']);
|
||||
expect($output->fetch())->toContain('Pest '.version());
|
||||
});
|
||||
|
||||
it('do not outputs version when --version is not used', function () {
|
||||
$output = new BufferedOutput();
|
||||
$plugin = new Version($output);
|
||||
|
||||
$plugin->handleArguments(['foo', 'bar']);
|
||||
expect($output->fetch())->toBe('');
|
||||
});
|
||||
Reference in New Issue
Block a user