mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 02:52:12 +02:00
asd
This commit is contained in:
@ -929,15 +929,24 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
|
|||||||
$reasons === [] ? '' : ' ('.implode(', ', $reasons).')',
|
$reasons === [] ? '' : ' ('.implode(', ', $reasons).')',
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($changedFiles !== []) {
|
// List the first few affected test files so the developer can see
|
||||||
$preview = array_slice($changedFiles, 0, 3);
|
// *which* tests are about to run, not just the count. Capped at 10
|
||||||
$remainder = count($changedFiles) - count($preview);
|
// to keep the line tight on large impact sets.
|
||||||
$suffix = $remainder > 0 ? sprintf(', +%d more', $remainder) : '';
|
$previewLimit = 10;
|
||||||
|
$sorted = $affected;
|
||||||
|
sort($sorted);
|
||||||
|
$preview = array_slice($sorted, 0, $previewLimit);
|
||||||
|
|
||||||
|
foreach ($preview as $file) {
|
||||||
|
$this->output->writeln(sprintf(' <fg=gray> • %s</>', $file));
|
||||||
|
}
|
||||||
|
|
||||||
|
$remainder = count($sorted) - count($preview);
|
||||||
|
|
||||||
|
if ($remainder > 0) {
|
||||||
$this->output->writeln(sprintf(
|
$this->output->writeln(sprintf(
|
||||||
' <fg=gray>└ %s%s</>',
|
' <fg=gray> … +%d more</>',
|
||||||
implode(', ', $preview),
|
$remainder,
|
||||||
$suffix,
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user