class NativePhpunitPrinter

Hierarchy

Expanded class hierarchy of NativePhpunitPrinter

File

drupal/core/vendor/doctrine/common/tests/NativePhpunitTask.php, line 141

View source
class NativePhpunitPrinter extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener {
  private $_messages = array();
  public function write($buffer) {

    // do nothing
  }
  public function getMessages() {
    return $this->_messages;
  }

  /**
   * An error occurred.
   *
   * @param  PHPUnit_Framework_Test $test
   * @param  Exception              $e
   * @param  float                  $time
   */
  public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {
    $this->_messages[] = "Test ERROR: " . $test
      ->getName() . ": " . $e
      ->getMessage();
  }

  /**
   * A failure occurred.
   *
   * @param  PHPUnit_Framework_Test                 $test
   * @param  PHPUnit_Framework_AssertionFailedError $e
   * @param  float                                  $time
   */
  public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {
    $this->_messages[] = "Test FAILED: " . $test
      ->getName() . ": " . $e
      ->getMessage();
  }

  /**
   * Incomplete test.
   *
   * @param  PHPUnit_Framework_Test $test
   * @param  Exception              $e
   * @param  float                  $time
   */
  public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
  }

  /**
   * Skipped test.
   *
   * @param  PHPUnit_Framework_Test $test
   * @param  Exception              $e
   * @param  float                  $time
   * @since  Method available since Release 3.0.0
   */
  public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
  }

  /**
   * A test suite started.
   *
   * @param  PHPUnit_Framework_TestSuite $suite
   * @since  Method available since Release 2.2.0
   */
  public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
  }

  /**
   * A test suite ended.
   *
   * @param  PHPUnit_Framework_TestSuite $suite
   * @since  Method available since Release 2.2.0
   */
  public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
  }

  /**
   * A test started.
   *
   * @param  PHPUnit_Framework_Test $test
   */
  public function startTest(PHPUnit_Framework_Test $test) {
  }

  /**
   * A test ended.
   *
   * @param  PHPUnit_Framework_Test $test
   * @param  float                  $time
   */
  public function endTest(PHPUnit_Framework_Test $test, $time) {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
NativePhpunitPrinter::$_messages private property
NativePhpunitPrinter::addError public function An error occurred. Overrides PHPUnit_Framework_TestListener::addError
NativePhpunitPrinter::addFailure public function A failure occurred. Overrides PHPUnit_Framework_TestListener::addFailure
NativePhpunitPrinter::addIncompleteTest public function Incomplete test. Overrides PHPUnit_Framework_TestListener::addIncompleteTest
NativePhpunitPrinter::addSkippedTest public function Skipped test. Overrides PHPUnit_Framework_TestListener::addSkippedTest
NativePhpunitPrinter::endTest public function A test ended. Overrides PHPUnit_Framework_TestListener::endTest
NativePhpunitPrinter::endTestSuite public function A test suite ended. Overrides PHPUnit_Framework_TestListener::endTestSuite
NativePhpunitPrinter::getMessages public function
NativePhpunitPrinter::startTest public function A test started. Overrides PHPUnit_Framework_TestListener::startTest
NativePhpunitPrinter::startTestSuite public function A test suite started. Overrides PHPUnit_Framework_TestListener::startTestSuite
NativePhpunitPrinter::write public function Overrides PHPUnit_Util_Printer::write
PHPUnit_Util_Printer::$autoFlush protected property If TRUE, flush output after every write.
PHPUnit_Util_Printer::$out protected property
PHPUnit_Util_Printer::$outTarget protected property
PHPUnit_Util_Printer::$printsHTML protected property 1
PHPUnit_Util_Printer::flush public function Flush buffer, optionally tidy up HTML, and close output if it's not to a php stream 2
PHPUnit_Util_Printer::getAutoFlush public function Check auto-flush mode.
PHPUnit_Util_Printer::incrementalFlush public function Performs a safe, incremental flush.
PHPUnit_Util_Printer::setAutoFlush public function Set auto-flushing mode.
PHPUnit_Util_Printer::__construct public function Constructor. 4