Add test for --thanks

This commit is contained in:
Owen Voke
2020-07-01 10:27:12 +01:00
parent 64a8ed04ff
commit 8e203e914e
2 changed files with 20 additions and 2 deletions

View File

@ -135,6 +135,10 @@
✓ it throws exception when `process isolation` is true
✓ it do not throws exception when `process isolation` is false
WARN Tests\Unit\Plugins\Thanks
- it outputs funding options when --thanks is used → The plugin uses `exit()` so not sure how to implement this
✓ it does not output funding options when --thanks is not used
PASS Tests\Unit\Plugins\Version
✓ it outputs the version when --version is used
✓ it do not outputs version when --version is not used
@ -167,5 +171,5 @@
WARN Tests\Visual\Success
- visual snapshot of test suite on success
Tests: 6 skipped, 96 passed
Time: 3.56s
Tests: 7 skipped, 97 passed
Time: 3.57s

View File

@ -0,0 +1,14 @@
<?php
use Pest\Plugins\Thanks;
use Symfony\Component\Console\Output\BufferedOutput;
it('outputs funding options when --thanks is used')->skip('The plugin uses `exit()` so not sure how to implement this');
it('does not output funding options when --thanks is not used', function () {
$output = new BufferedOutput();
$plugin = new Thanks($output);
$plugin->handleArguments(['foo', 'bar']);
assertEquals('', $output->fetch());
});