Файл: vendor/laravel/framework/src/Illuminate/Testing/ParallelConsoleOutput.php
Строк: 67
<?php
namespace IlluminateTesting;
use IlluminateSupportCollection;
use IlluminateSupportStr;
use SymfonyComponentConsoleOutputConsoleOutput;
class ParallelConsoleOutput extends ConsoleOutput
{
/**
* The original output instance.
*
* @var SymfonyComponentConsoleOutputOutputInterface
*/
protected $output;
/**
* The output that should be ignored.
*
* @var array
*/
protected $ignore = [
'Running phpunit in',
'Configuration read from',
];
/**
* Create a new Parallel ConsoleOutput instance.
*
* @param SymfonyComponentConsoleOutputOutputInterface $output
*/
public function __construct($output)
{
parent::__construct(
$output->getVerbosity(),
$output->isDecorated(),
$output->getFormatter(),
);
$this->output = $output;
}
/**
* Writes a message to the output.
*
* @param string|iterable $messages
* @param bool $newline
* @param int $options
* @return void
*/
public function write($messages, bool $newline = false, int $options = 0): void
{
$messages = (new Collection($messages))
->filter(fn ($message) => ! Str::contains($message, $this->ignore));
$this->output->write($messages->toArray(), $newline, $options);
}
}