Class ColorTextReporter

Description

Provides an ANSI-colored TextReporter for viewing test results.

This code is made available under the same terms as SimpleTest. It is based off of code that Jason Sweat originally published on the SimpleTest mailing list.

Located in /extensions/colortext_reporter.php (line 27)

SimpleScorer
   |
   --SimpleReporter
      |
      --TextReporter
         |
         --ColorTextReporter
Variable Summary
 mixed $_failColor
 mixed $_passColor
Method Summary
 ColorTextReporter __construct ({@link 0)
 void paintFooter (string $test_name)
 void _resetColor ()
 void _setColor (int $color)
Variables
mixed $_failColor = 41 (line 28)
mixed $_passColor = 42 (line 29)
Methods
Constructor __construct (line 36)

Handle initialization

ColorTextReporter __construct ({@link 0)
  • {@link 0: TextReporter}

Redefinition of:
TextReporter::__construct()
Does nothing yet. The first output will be sent on the first test start.
paintFooter (line 48)

Capture the attempt to display the final test results and insert the ANSI-color codes in place.

void paintFooter (string $test_name)
  • string $test_name

Redefinition of:
TextReporter::paintFooter()
Paints the end of the test with a summary of the passes and failures.
_resetColor (line 82)

Resets the color back to normal.

  • access: protected
void _resetColor ()
_setColor (line 72)

Sets the terminal to an ANSI-standard $color

  • access: protected
void _setColor (int $color)
  • int $color

Inherited Methods

Inherited From TextReporter

 TextReporter::__construct()
 TextReporter::paintError()
 TextReporter::paintException()
 TextReporter::paintFail()
 TextReporter::paintFooter()
 TextReporter::paintFormattedMessage()
 TextReporter::paintHeader()
 TextReporter::paintSkip()

Inherited From SimpleReporter

 SimpleReporter::__construct()
 SimpleReporter::getDumper()
 SimpleReporter::getTestCaseCount()
 SimpleReporter::getTestCaseProgress()
 SimpleReporter::getTestList()
 SimpleReporter::inCli()
 SimpleReporter::paintCaseEnd()
 SimpleReporter::paintCaseStart()
 SimpleReporter::paintFooter()
 SimpleReporter::paintGroupEnd()
 SimpleReporter::paintGroupStart()
 SimpleReporter::paintHeader()
 SimpleReporter::paintMethodEnd()
 SimpleReporter::paintMethodStart()

Inherited From SimpleScorer

 SimpleScorer::__construct()
 SimpleScorer::createInvoker()
 SimpleScorer::getExceptionCount()
 SimpleScorer::getFailCount()
 SimpleScorer::getPassCount()
 SimpleScorer::getStatus()
 SimpleScorer::makeDry()
 SimpleScorer::paintCaseEnd()
 SimpleScorer::paintCaseStart()
 SimpleScorer::paintError()
 SimpleScorer::paintException()
 SimpleScorer::paintFail()
 SimpleScorer::paintFormattedMessage()
 SimpleScorer::paintGroupEnd()
 SimpleScorer::paintGroupStart()
 SimpleScorer::paintMessage()
 SimpleScorer::paintMethodEnd()
 SimpleScorer::paintMethodStart()
 SimpleScorer::paintPass()
 SimpleScorer::paintSignal()
 SimpleScorer::paintSkip()
 SimpleScorer::shouldInvoke()

Documentation generated on Sun, 31 Oct 2010 16:31:02 -0500 by phpDocumentor 1.4.3