You are here

public function PHPUnit_Util_Printer::flush in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Util/Printer.php \PHPUnit_Util_Printer::flush()

Flush buffer, optionally tidy up HTML, and close output if it's not to a php stream

2 calls to PHPUnit_Util_Printer::flush()
PHPUnit_Util_Log_JUnit::flush in vendor/phpunit/phpunit/src/Util/Log/JUnit.php
Flush buffer and close output.
PHPUnit_Util_TestDox_ResultPrinter::flush in vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php
Flush buffer and close output.
2 methods override PHPUnit_Util_Printer::flush()
PHPUnit_Util_Log_JUnit::flush in vendor/phpunit/phpunit/src/Util/Log/JUnit.php
Flush buffer and close output.
PHPUnit_Util_TestDox_ResultPrinter::flush in vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php
Flush buffer and close output.

File

vendor/phpunit/phpunit/src/Util/Printer.php, line 77

Class

PHPUnit_Util_Printer
Utility class that can print to STDOUT or write to a file.

Code

public function flush() {
  if ($this->out && strncmp($this->outTarget, 'php://', 6) !== 0) {
    fclose($this->out);
  }
  if ($this->printsHTML === true && $this->outTarget !== null && strpos($this->outTarget, 'php://') !== 0 && strpos($this->outTarget, 'socket://') !== 0 && extension_loaded('tidy')) {
    file_put_contents($this->outTarget, tidy_repair_file($this->outTarget, array(
      'indent' => true,
      'wrap' => 0,
    ), 'utf8'));
  }
}