class HtmlResultPrinter extends ResultPrinter (View source)

Prints TestDox documentation in HTML format.

Properties

protected bool $autoFlush If true, flush output after every write. from Printer
protected resource $out from Printer
protected string $outTarget from Printer
protected NamePrettifier $prettifier from ResultPrinter
protected string $testClass from ResultPrinter
protected int $testStatus from ResultPrinter
protected array $tests from ResultPrinter
protected int $successful from ResultPrinter
protected int $warned from ResultPrinter
protected int $failed from ResultPrinter
protected int $risky from ResultPrinter
protected int $skipped from ResultPrinter
protected int $incomplete from ResultPrinter
protected string|null $currentTestClassPrettified from ResultPrinter
protected string|null $currentTestMethodPrettified from ResultPrinter

Methods

__construct(mixed $out = null, array $groups = [], array $excludeGroups = [])

No description

flush()

Flush buffer and close output.

incrementalFlush()

Performs a safe, incremental flush.

from Printer
write(string $buffer)

No description

from Printer
bool
getAutoFlush()

Check auto-flush mode.

from Printer
setAutoFlush(bool $autoFlush)

Set auto-flushing mode.

from Printer
addError(Test $test, Exception $e, float $time)

An error occurred.

addWarning(Test $test, Warning $e, float $time)

A warning occurred.

addFailure(Test $test, AssertionFailedError $e, float $time)

A failure occurred.

addIncompleteTest(Test $test, Exception $e, float $time)

Incomplete test.

addRiskyTest(Test $test, Exception $e, float $time)

Risky test.

addSkippedTest(Test $test, Exception $e, float $time)

Skipped test.

startTestSuite(TestSuite $suite)

A testsuite started.

endTestSuite(TestSuite $suite)

A testsuite ended.

startTest(Test $test)

A test started.

endTest(Test $test, float $time)

A test ended.

doEndClass()

No description

startRun()

Handler for 'start run' event.

startClass(string $name)

Handler for 'start class' event.

onTest(string $name, bool $success = true)

Handler for 'on test' event.

endClass(string $name)

Handler for 'end class' event.

endRun()

Handler for 'end run' event.

Details

__construct(mixed $out = null, array $groups = [], array $excludeGroups = [])

Parameters

mixed $out
array $groups
array $excludeGroups

flush()

Flush buffer and close output.

incrementalFlush()

Performs a safe, incremental flush.

Do not confuse this function with the flush() function of this class, since the flush() function may close the file being written to, rendering the current object no longer usable.

write(string $buffer)

Parameters

string $buffer

bool getAutoFlush()

Check auto-flush mode.

Return Value

bool

setAutoFlush(bool $autoFlush)

Set auto-flushing mode.

If set, incremental flushes will be done after each write. This should not be confused with the different effects of this class' flush() method.

Parameters

bool $autoFlush

addError(Test $test, Exception $e, float $time)

An error occurred.

Parameters

Test $test
Exception $e
float $time

addWarning(Test $test, Warning $e, float $time)

A warning occurred.

Parameters

Test $test
Warning $e
float $time

addFailure(Test $test, AssertionFailedError $e, float $time)

A failure occurred.

Parameters

Test $test
AssertionFailedError $e
float $time

addIncompleteTest(Test $test, Exception $e, float $time)

Incomplete test.

Parameters

Test $test
Exception $e
float $time

addRiskyTest(Test $test, Exception $e, float $time)

Risky test.

Parameters

Test $test
Exception $e
float $time

addSkippedTest(Test $test, Exception $e, float $time)

Skipped test.

Parameters

Test $test
Exception $e
float $time

startTestSuite(TestSuite $suite)

A testsuite started.

Parameters

TestSuite $suite

endTestSuite(TestSuite $suite)

A testsuite ended.

Parameters

TestSuite $suite

startTest(Test $test)

A test started.

Parameters

Test $test

endTest(Test $test, float $time)

A test ended.

Parameters

Test $test
float $time

protected doEndClass()

protected startRun()

Handler for 'start run' event.

protected startClass(string $name)

Handler for 'start class' event.

Parameters

string $name

protected onTest(string $name, bool $success = true)

Handler for 'on test' event.

Parameters

string $name
bool $success

protected endClass(string $name)

Handler for 'end class' event.

Parameters

string $name

protected endRun()

Handler for 'end run' event.