public function PHPUnit_Util_Log_JSON::write

Parameters

string $buffer:

Overrides PHPUnit_Util_Printer::write

3 calls to PHPUnit_Util_Log_JSON::write()
PHPUnit_Util_Log_JSON::startTest in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Log/JSON.php
A test started.
PHPUnit_Util_Log_JSON::startTestSuite in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Log/JSON.php
A testsuite started.
PHPUnit_Util_Log_JSON::writeCase in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Log/JSON.php

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Log/JSON.php, line 246

Class

PHPUnit_Util_Log_JSON
A TestListener that generates JSON messages.

Code

public function write($buffer) {
  if (defined('JSON_PRETTY_PRINT')) {
    parent::write(json_encode($buffer, JSON_PRETTY_PRINT));
  }
  else {
    parent::write(json_encode($buffer));
  }
}