PHPUnit_TextUI_ResultPrinter
class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUnit_Framework_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 PHPUnit_Util_Printer |
protected resource | $out | from PHPUnit_Util_Printer | |
protected string | $outTarget | from PHPUnit_Util_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
A failure occurred.
A warning occurred.
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 128
__construct(mixed $out = null, bool $verbose = false, string $colors = self::COLOR_DEFAULT, bool $debug = false, int|string $numberOfColumns = 80, bool $reverse = false)
Constructor.
in PHPUnit_Util_Printer at line 71
flush()
Flush buffer and close output if it's not to a PHP stream
in PHPUnit_Util_Printer at line 85
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.
in PHPUnit_Util_Printer at line 97
write(string $buffer)
in PHPUnit_Util_Printer at line 123
bool
getAutoFlush()
Check auto-flush mode.
in PHPUnit_Util_Printer at line 136
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 179
printResult(PHPUnit_Framework_TestResult $result)
at line 199
protected
printDefects(array $defects, string $type)
at line 238
protected
printDefect(PHPUnit_Framework_TestFailure $defect, int $count)
at line 248
protected
printDefectHeader(PHPUnit_Framework_TestFailure $defect, int $count)
at line 262
protected
printDefectTrace(PHPUnit_Framework_TestFailure $defect)
at line 275
protected
printErrors(PHPUnit_Framework_TestResult $result)
at line 283
protected
printFailures(PHPUnit_Framework_TestResult $result)
at line 291
protected
printWarnings(PHPUnit_Framework_TestResult $result)
at line 299
protected
printIncompletes(PHPUnit_Framework_TestResult $result)
at line 307
protected
printRisky(PHPUnit_Framework_TestResult $result)
at line 315
protected
printSkipped(PHPUnit_Framework_TestResult $result)
at line 320
protected
printHeader()
at line 328
protected
printFooter(PHPUnit_Framework_TestResult $result)
at line 404
printWaitPrompt()
at line 416
addError(PHPUnit_Framework_Test $test, Exception $e, float $time)
An error occurred.
at line 429
addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, float $time)
A failure occurred.
at line 442
addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time)
A warning occurred.
at line 455
addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, float $time)
Incomplete test.
at line 468
addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, float $time)
Risky test.
at line 481
addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, float $time)
Skipped test.
at line 492
startTestSuite(PHPUnit_Framework_TestSuite $suite)
A testsuite started.
at line 506
endTestSuite(PHPUnit_Framework_TestSuite $suite)
A testsuite ended.
at line 515
startTest(PHPUnit_Framework_Test $test)
A test started.
at line 533
endTest(PHPUnit_Framework_Test $test, float $time)
A test ended.
at line 557
protected
writeProgress(string $progress)
at line 586
protected
writeNewLine()
at line 601
protected string
formatWithColor(string $color, string $buffer)
Formats a buffer with a specified ANSI color sequence if colors are enabled.
at line 634
protected
writeWithColor(string $color, string $buffer, bool $lf = true)
Writes a buffer out with a color sequence if colors are enabled.
at line 649
protected
writeProgressWithColor(string $color, string $buffer)
Writes progress with a color sequence if colors are enabled.