class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener (View source)

Base class for printers of TestDox documentation.

Properties

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

Methods

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

No description

flush()

Flush buffer and close output.

incrementalFlush()

Performs a safe, incremental flush.

write(string $buffer)

No description

bool
getAutoFlush()

Check auto-flush mode.

setAutoFlush(bool $autoFlush)

Set auto-flushing mode.

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

An error occurred.

addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time)

A warning occurred.

addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, float $time)

A failure occurred.

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

Incomplete test.

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

Risky test.

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

Skipped test.

startTestSuite(PHPUnit_Framework_TestSuite $suite)

A testsuite started.

endTestSuite(PHPUnit_Framework_TestSuite $suite)

A testsuite ended.

startTest(PHPUnit_Framework_Test $test)

A test started.

endTest(PHPUnit_Framework_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(PHPUnit_Framework_Test $test, Exception $e, float $time)

An error occurred.

Parameters

PHPUnit_Framework_Test $test
Exception $e
float $time

addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time)

A warning occurred.

Parameters

PHPUnit_Framework_Test $test
PHPUnit_Framework_Warning $e
float $time

addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, float $time)

A failure occurred.

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

Incomplete test.

Parameters

PHPUnit_Framework_Test $test
Exception $e
float $time

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

Risky test.

Parameters

PHPUnit_Framework_Test $test
Exception $e
float $time

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

Skipped test.

Parameters

PHPUnit_Framework_Test $test
Exception $e
float $time

startTestSuite(PHPUnit_Framework_TestSuite $suite)

A testsuite started.

Parameters

PHPUnit_Framework_TestSuite $suite

endTestSuite(PHPUnit_Framework_TestSuite $suite)

A testsuite ended.

Parameters

PHPUnit_Framework_TestSuite $suite

startTest(PHPUnit_Framework_Test $test)

A test started.

Parameters

PHPUnit_Framework_Test $test

endTest(PHPUnit_Framework_Test $test, float $time)

A test ended.

Parameters

PHPUnit_Framework_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.