SimpleTest


SimpleTest\TextReporter
reporter.php at line 161

Class TextReporter

SimpleScorer
└─SimpleReporter
└─TextReporter

public class TextReporter
extends SimpleReporter

Sample minimal test displayer. Generates only failure messages and a pass count. For command line use. I've tried to make it look like JUnit, but I wanted to output the errors as they arrived which meant dropping the dots.

Subpackage:
UnitTester

Constructor Summary

TextReporter()

Does nothing yet.

Method Summary
abstract void

paintException(string message, Exception exception)

Paints a PHP error or exception.

void

paintFail(string message)

Paints the test failure as a stack trace.

void

paintFooter(string test_name)

Paints the end of the test with a summary of the passes and failures.

void

paintFormattedMessage(string message)

Paints formatted text such as dumped variables.

void

paintHeader(string test_name)

Paints the title only.

Methods inherited from SimpleTest\SimpleReporter
getTestCaseCount, getTestCaseProgress, getTestList, inCli, paintCaseEnd, paintCaseStart, paintFooter, paintGroupEnd, paintGroupStart, paintHeader, paintMethodEnd, paintMethodStart
Methods inherited from SimpleTest\SimpleScorer
getExceptionCount, getFailCount, getPassCount, getStatus, makeDry, paintCaseEnd, paintCaseStart, paintError, paintException, paintFail, paintFormattedMessage, paintGroupEnd, paintGroupStart, paintMessage, paintMethodEnd, paintMethodStart, paintPass, paintSignal, shouldInvoke

Constructor Detail

reporter.php at line 168

TextReporter

public TextReporter()

Does nothing yet. The first output will be sent on the first test start.


Method Detail

reporter.php at line 226

paintException

public abstract void paintException(string message, Exception exception)

Paints a PHP error or exception.

Parameters:
message - Message is ignored.

reporter.php at line 211

paintFail

public void paintFail(string message)

Paints the test failure as a stack trace.

Parameters:
message - Failure message displayed in the context of the other tests.

reporter.php at line 191

paintFooter

public void paintFooter(string test_name)

Paints the end of the test with a summary of the passes and failures.

Parameters:
test_name - Name class of test.

reporter.php at line 236

paintFormattedMessage

public void paintFormattedMessage(string message)

Paints formatted text such as dumped variables.

Parameters:
message - Text to show.

reporter.php at line 177

paintHeader

public void paintHeader(string test_name)

Paints the title only.

Parameters:
test_name - Name class of test.

SimpleTest