mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
feat: adds --version option
This commit is contained in:
20
tests/Unit/Plugins/Version.php
Normal file
20
tests/Unit/Plugins/Version.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use Pest\Plugins\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']);
|
||||
assertEquals("Pest 0.2.2\n", $output->fetch());
|
||||
});
|
||||
|
||||
it('do not outputs version when --version is not used', function () {
|
||||
$output = new BufferedOutput();
|
||||
$plugin = new Version($output);
|
||||
|
||||
$plugin->handleArguments(['foo', 'bar']);
|
||||
assertEquals('', $output->fetch());
|
||||
});
|
||||
Reference in New Issue
Block a user