You are here

public function CommandTester::getDisplay in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/console/Tester/CommandTester.php \Symfony\Component\Console\Tester\CommandTester::getDisplay()

Gets the display returned by the last execution of the command.

Parameters

bool $normalize Whether to normalize end of lines to \n or not:

Return value

string The display

File

vendor/symfony/console/Tester/CommandTester.php, line 90

Class

CommandTester
Eases the testing of console commands.

Namespace

Symfony\Component\Console\Tester

Code

public function getDisplay($normalize = false) {
  rewind($this->output
    ->getStream());
  $display = stream_get_contents($this->output
    ->getStream());
  if ($normalize) {
    $display = str_replace(PHP_EOL, "\n", $display);
  }
  return $display;
}