mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
tests: add visual test for help output
This commit is contained in:
@ -377,6 +377,9 @@
|
|||||||
PASS Tests\Unit\TestSuite
|
PASS Tests\Unit\TestSuite
|
||||||
✓ it does not allow to add the same test description twice
|
✓ it does not allow to add the same test description twice
|
||||||
|
|
||||||
|
PASS Tests\Visual\Help
|
||||||
|
✓ visual snapshot of help command output
|
||||||
|
|
||||||
PASS Tests\Visual\SingleTestOrDirectory
|
PASS Tests\Visual\SingleTestOrDirectory
|
||||||
✓ allows to run a single test
|
✓ allows to run a single test
|
||||||
✓ allows to run a directory
|
✓ allows to run a directory
|
||||||
@ -394,5 +397,5 @@
|
|||||||
✓ depends with defined arguments
|
✓ depends with defined arguments
|
||||||
✓ depends run test only once
|
✓ depends run test only once
|
||||||
|
|
||||||
Tests: 7 skipped, 232 passed
|
Tests: 7 skipped, 233 passed
|
||||||
|
|
||||||
13
tests/Visual/Help.php
Normal file
13
tests/Visual/Help.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
test('visual snapshot of help command output', function () {
|
||||||
|
$output = function () {
|
||||||
|
$process = (new Symfony\Component\Process\Process(['php', 'bin/pest', '--help', '--colors=never']));
|
||||||
|
|
||||||
|
$process->run();
|
||||||
|
|
||||||
|
return $process->getOutput();
|
||||||
|
};
|
||||||
|
|
||||||
|
expect($output())->toContain('Pest Options:');
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user