mirror of
https://github.com/pestphp/pest.git
synced 2026-03-05 23:37:22 +01:00
feat: note()
This commit is contained in:
11
bin/pest
11
bin/pest
@ -4,6 +4,7 @@
|
||||
use Pest\Kernel;
|
||||
use Pest\Panic;
|
||||
use Pest\TestCaseFilters\GitDirtyTestCaseFilter;
|
||||
use Pest\TestCaseMethodFilters\NotesTestCaseFilter;
|
||||
use Pest\TestCaseMethodFilters\TodoTestCaseFilter;
|
||||
use Pest\TestSuite;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
@ -17,6 +18,7 @@ use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
|
||||
$dirty = false;
|
||||
$todo = false;
|
||||
$notes = false;
|
||||
|
||||
foreach ($arguments as $key => $value) {
|
||||
if ($value === '--compact') {
|
||||
@ -43,6 +45,11 @@ use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
unset($arguments[$key]);
|
||||
}
|
||||
|
||||
if ($value === '--notes') {
|
||||
$notes = true;
|
||||
unset($arguments[$key]);
|
||||
}
|
||||
|
||||
if (str_contains($value, '--teamcity')) {
|
||||
unset($arguments[$key]);
|
||||
$arguments[] = '--no-output';
|
||||
@ -81,6 +88,10 @@ use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
$testSuite->tests->addTestCaseMethodFilter(new TodoTestCaseFilter());
|
||||
}
|
||||
|
||||
if ($notes) {
|
||||
$testSuite->tests->addTestCaseMethodFilter(new NotesTestCaseFilter());
|
||||
}
|
||||
|
||||
$isDecorated = $input->getParameterOption('--colors', 'always') !== 'never';
|
||||
|
||||
$output = new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, $isDecorated);
|
||||
|
||||
Reference in New Issue
Block a user