This commit is contained in:
Luke Downing
2023-02-08 17:08:22 +00:00
committed by Nuno Maduro
parent d5495a7e3a
commit 17cda168e1

View File

@ -6,6 +6,9 @@ use Symfony\Component\Console\Output\ConsoleOutput;
class CleanConsoleOutput extends ConsoleOutput class CleanConsoleOutput extends ConsoleOutput
{ {
/**
* @inheritdoc
*/
protected function doWrite(string $message, bool $newline): void protected function doWrite(string $message, bool $newline): void
{ {
if ($this->isOpeningHeadline($message)) { if ($this->isOpeningHeadline($message)) {
@ -15,6 +18,10 @@ class CleanConsoleOutput extends ConsoleOutput
parent::doWrite($message, $newline); parent::doWrite($message, $newline);
} }
/**
* Determines if the given message is the descriptive message
* that Paratest outputs when it starts.
*/
private function isOpeningHeadline(string $message): bool private function isOpeningHeadline(string $message): bool
{ {
return str_contains($message, 'by Sebastian Bergmann and contributors.'); return str_contains($message, 'by Sebastian Bergmann and contributors.');