- \PHPUnit_Util_Printer
- \PHPUnit_TextUI_ResultPrinter
class (none) \ PHPUnit_TextUI_ResultPrinter
- All implemented interfaces:
- PHPUnit_Framework_TestListener
Prints the result of a TextUI TestRunner run.
Method Summary
Inherited Method Summary
| Name | Description |
|---|---|
| flush() | Flush buffer, optionally tidy up HTML, and close output if it's not to a php stream (from PHPUnit_Util_Printer) |
| getAutoFlush() | Check auto-flush mode. (from PHPUnit_Util_Printer) |
| incrementalFlush() | Performs a safe, incremental flush. (from PHPUnit_Util_Printer) |
| setAutoFlush($autoFlush) | Set auto-flushing mode. (from PHPUnit_Util_Printer) |
| write($buffer) | (from PHPUnit_Util_Printer) |
public function __construct($out = null, $verbose = false, $colors, $debug = false, $numberOfColumns = 80)
Constructor.
- Overrides:
- __construct($out = null)
- Parameters:
mixed- $outboolean- $debugstring- $colorsinteger|string- $numberOfColumns- Defaults:
out=nullverbose=falsecolors= PhpParser\Node\Expr\ClassConstFetchdebug=falsenumberOfColumns= 80- Throws:
- PHPUnit_Framework_Exception
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
An error occurred.
- Parameters:
PHPUnit_Framework_Test- $testException- $efloat- $time
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
A failure occurred.
- Parameters:
PHPUnit_Framework_Test- $testPHPUnit_Framework_AssertionFailedError- $efloat- $time
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
Incomplete test.
- Parameters:
PHPUnit_Framework_Test- $testException- $efloat- $time
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
Risky test.
- Parameters:
PHPUnit_Framework_Test- $testException- $efloat- $time
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
Skipped test.
- Parameters:
PHPUnit_Framework_Test- $testException- $efloat- $time
public function endTest(PHPUnit_Framework_Test $test, $time)
A test ended.
- Parameters:
PHPUnit_Framework_Test- $testfloat- $time
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
A testsuite ended.
- Parameters:
PHPUnit_Framework_TestSuite- $suite
protected function formatWithColor($color, $buffer)
Formats a buffer with a specified ANSI color sequence if colors are enabled.
- Parameters:
string- $buffer- Returns:
- string
protected function getCountString($count, $name)
- Parameters:
integer- $countstring- $name- Returns:
- string
protected function printDefect(PHPUnit_Framework_TestFailure $defect, $count)
- Parameters:
PHPUnit_Framework_TestFailure- $defectinteger- $count
protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $count)
- Parameters:
PHPUnit_Framework_TestFailure- $defectinteger- $count
protected function printDefectTrace(PHPUnit_Framework_TestFailure $defect)
- Parameters:
PHPUnit_Framework_TestFailure- $defect
protected function printDefects(array $defects, $type)
- Parameters:
array- $defectsstring- $type
protected function printErrors(PHPUnit_Framework_TestResult $result)
- Parameters:
PHPUnit_Framework_TestResult- $result
protected function printFailures(PHPUnit_Framework_TestResult $result)
- Parameters:
PHPUnit_Framework_TestResult- $result
protected function printFooter(PHPUnit_Framework_TestResult $result)
- Parameters:
PHPUnit_Framework_TestResult- $result
protected function printHeader()
protected function printIncompletes(PHPUnit_Framework_TestResult $result)
- Parameters:
PHPUnit_Framework_TestResult- $result
public function printResult(PHPUnit_Framework_TestResult $result)
- Parameters:
PHPUnit_Framework_TestResult- $result
protected function printRisky(PHPUnit_Framework_TestResult $result)
- Parameters:
PHPUnit_Framework_TestResult- $result
protected function printSkipped(PHPUnit_Framework_TestResult $result)
- Parameters:
PHPUnit_Framework_TestResult- $result
public function printWaitPrompt()
public function startTest(PHPUnit_Framework_Test $test)
A test started.
- Parameters:
PHPUnit_Framework_Test- $test
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
A testsuite started.
- Parameters:
PHPUnit_Framework_TestSuite- $suite
protected function writeNewLine()
protected function writeProgress($progress)
- Parameters:
string- $progress
protected function writeProgressWithColor($color, $buffer)
Writes progress with a color sequence if colors are enabled.
- Parameters:
string- $buffer
protected function writeWithColor($color, $buffer)
Writes a buffer out with a color sequence if colors are enabled.
- Parameters:
string- $buffer