mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
23 lines
606 B
PHP
23 lines
606 B
PHP
<?php
|
|
|
|
use Pest\Plugins\Version;
|
|
use Symfony\Component\Console\Output\BufferedOutput;
|
|
|
|
use function Pest\version;
|
|
|
|
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('');
|
|
});
|