You are here

public function PHPUnit_Util_Printer::write in Zircon Profile 8

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

Parameters

string $buffer:

30 calls to PHPUnit_Util_Printer::write()
PHPUnit_TextUI_ResultPrinter::endTest in vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php
A test ended.
PHPUnit_TextUI_ResultPrinter::printDefectHeader in vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php
PHPUnit_TextUI_ResultPrinter::printDefects in vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php
PHPUnit_TextUI_ResultPrinter::printDefectTrace in vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php
PHPUnit_TextUI_ResultPrinter::printFooter in vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php

... See full list

1 method overrides PHPUnit_Util_Printer::write()
PHPUnit_Util_Log_JSON::write in vendor/phpunit/phpunit/src/Util/Log/JSON.php

File

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

Class

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

Code

public function write($buffer) {
  if ($this->out) {
    fwrite($this->out, $buffer);
    if ($this->autoFlush) {
      $this
        ->incrementalFlush();
    }
  }
  else {
    if (PHP_SAPI != 'cli') {
      $buffer = htmlspecialchars($buffer);
    }
    print $buffer;
    if ($this->autoFlush) {
      $this
        ->incrementalFlush();
    }
  }
}