mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Add test for --thanks
This commit is contained in:
@ -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
|
||||
|
||||
14
tests/Unit/Plugins/Thanks.php
Normal file
14
tests/Unit/Plugins/Thanks.php
Normal 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());
|
||||
});
|
||||
Reference in New Issue
Block a user