Files
pest/tests/Unit/Plugins/Version.php
Fabio Ivona 1706e1d2e0 fix lint
2022-08-02 11:01:17 +02:00

24 lines
607 B
PHP

<?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('');
});