class NativePhpunitPrinter

Hierarchy

  • class \NativePhpunitPrinter extends \PHPUnit_Util_Printer implements \PHPUnit_Framework_TestListener

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.
NativePhpunitPrinter::addFailure public function A failure occurred.
NativePhpunitPrinter::addIncompleteTest public function Incomplete test.
NativePhpunitPrinter::addSkippedTest public function Skipped test.
NativePhpunitPrinter::endTest public function A test ended.
NativePhpunitPrinter::endTestSuite public function A test suite ended.
NativePhpunitPrinter::getMessages public function
NativePhpunitPrinter::startTest public function A test started.
NativePhpunitPrinter::startTestSuite public function A test suite started.
NativePhpunitPrinter::write public function