ResultPrinter
class ResultPrinter extends Printer implements TestListener (View source)
Prints the result of a TextUI TestRunner run.
Constants
EVENT_TEST_START |
|
EVENT_TEST_END |
|
EVENT_TESTSUITE_START |
|
EVENT_TESTSUITE_END |
|
COLOR_NEVER |
|
COLOR_AUTO |
|
COLOR_ALWAYS |
|
COLOR_DEFAULT |
|
Properties
protected bool | $autoFlush | If true, flush output after every write. | from Printer |
protected resource | $out | from Printer | |
protected string | $outTarget | from Printer | |
protected int | $column | ||
protected int | $maxColumn | ||
protected bool | $lastTestFailed | ||
protected int | $numAssertions | ||
protected int | $numTests | ||
protected int | $numTestsRun | ||
protected int | $numTestsWidth | ||
protected bool | $colors | ||
protected bool | $debug | ||
protected bool | $verbose |
Methods
Constructor.
No description
No description
No description
No description
No description
Formats a buffer with a specified ANSI color sequence if colors are enabled.
Writes a buffer out with a color sequence if colors are enabled.
Writes progress with a color sequence if colors are enabled.
Details
at line 143
__construct(mixed $out = null, bool $verbose = false, string $colors = self::COLOR_DEFAULT, bool $debug = false, int|string $numberOfColumns = 80, bool $reverse = false)
Constructor.
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.
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.
at line 194
printResult(TestResult $result)
at line 214
protected
printDefects(array $defects, string $type)
at line 253
protected
printDefect(TestFailure $defect, int $count)
at line 263
protected
printDefectHeader(TestFailure $defect, int $count)
at line 277
protected
printDefectTrace(TestFailure $defect)
at line 290
protected
printErrors(TestResult $result)
at line 298
protected
printFailures(TestResult $result)
at line 306
protected
printWarnings(TestResult $result)
at line 314
protected
printIncompletes(TestResult $result)
at line 322
protected
printRisky(TestResult $result)
at line 330
protected
printSkipped(TestResult $result)
at line 335
protected
printHeader()
at line 343
protected
printFooter(TestResult $result)
at line 419
printWaitPrompt()
at line 444
addFailure(Test $test, AssertionFailedError $e, float $time)
A failure occurred.
at line 572
protected
writeProgress(string $progress)
at line 599
protected
writeNewLine()
at line 614
protected string
formatWithColor(string $color, string $buffer)
Formats a buffer with a specified ANSI color sequence if colors are enabled.
at line 647
protected
writeWithColor(string $color, string $buffer, bool $lf = true)
Writes a buffer out with a color sequence if colors are enabled.
at line 662
protected
writeProgressWithColor(string $color, string $buffer)
Writes progress with a color sequence if colors are enabled.