public function 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 drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Log/JUnit.php
Flush buffer and close output.
PHPUnit_Util_TestDox_ResultPrinter::flush in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/TestDox/ResultPrinter.php
Flush buffer and close output.
2 methods override PHPUnit_Util_Printer::flush()
PHPUnit_Util_Log_JUnit::flush in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Log/JUnit.php
Flush buffer and close output.
PHPUnit_Util_TestDox_ResultPrinter::flush in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/TestDox/ResultPrinter.php
Flush buffer and close output.

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Printer.php, line 118

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'));
  }
}