SimpleTest


SimpleTest\HtmlReporter
reporter.php at line 21

Class HtmlReporter

SimpleScorer
└─SimpleReporter
└─HtmlReporter

public class HtmlReporter
extends SimpleReporter

Sample minimal test displayer. Generates only failure messages and a pass count.

Subpackage:
UnitTester

Constructor Summary

HtmlReporter(mixed character_set)

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 with a breadcrumbs trail of the nesting test suites below the top level test.

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 top of the web page setting the title to the name of the starting test.

static void

sendNoCacheHeaders()

Send the headers necessary to ensure the page is reloaded on every request.

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 30

HtmlReporter

public HtmlReporter(mixed character_set)

Does nothing yet. The first output will be sent on the first test start. For use by a web browser.


Method Detail

reporter.php at line 123

paintException

public abstract void paintException(string message, Exception exception)

Paints a PHP error or exception.

Parameters:
message - Message is ignored.

reporter.php at line 108

paintFail

public void paintFail(string message)

Paints the test failure with a breadcrumbs trail of the nesting test suites below the top level test.

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

reporter.php at line 86

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 137

paintFormattedMessage

public void paintFormattedMessage(string message)

Paints formatted text such as dumped variables.

Parameters:
message - Text to show.

reporter.php at line 41

paintHeader

public void paintHeader(string test_name)

Paints the top of the web page setting the title to the name of the starting test.

Parameters:
test_name - Name class of test.

reporter.php at line 61

sendNoCacheHeaders

public static void sendNoCacheHeaders()

Send the headers necessary to ensure the page is reloaded on every request. Otherwise you could be scratching your head over out of date test data.


SimpleTest