• internal This class is not covered by the backward compatibility promise for PHPUnit
CloneableInstantiable
ExtendsPHPUnit\Util\Printer
ImplementsPHPUnit\Framework\TestListener
Constants
public PHPUnit\TextUI\ResultPrinter::COLOR_ALWAYS = 'always'
public PHPUnit\TextUI\ResultPrinter::COLOR_AUTO = 'auto'
public PHPUnit\TextUI\ResultPrinter::COLOR_DEFAULT = 'never'
public PHPUnit\TextUI\ResultPrinter::COLOR_NEVER = 'never'
public PHPUnit\TextUI\ResultPrinter::EVENT_TEST_END = 1
public PHPUnit\TextUI\ResultPrinter::EVENT_TEST_START = 0
public PHPUnit\TextUI\ResultPrinter::EVENT_TESTSUITE_END = 3
public PHPUnit\TextUI\ResultPrinter::EVENT_TESTSUITE_START = 2
Methods
public __construct( $out = NULL, bool $verbose = false, string $colors = 'never', bool $debug = false, $numberOfColumns = 80, bool $reverse = false)
 

Constructor.

public addError(PHPUnit\Framework\Test $test, Throwable $t, float $time) : void
 

An error occurred.

public addFailure(PHPUnit\Framework\Test $test, PHPUnit\Framework\AssertionFailedError $e, float $time) : void
 

A failure occurred.

public addIncompleteTest(PHPUnit\Framework\Test $test, Throwable $t, float $time) : void
 

Incomplete test.

public addRiskyTest(PHPUnit\Framework\Test $test, Throwable $t, float $time) : void
 

Risky test.

public addSkippedTest(PHPUnit\Framework\Test $test, Throwable $t, float $time) : void
 

Skipped test.

public addWarning(PHPUnit\Framework\Test $test, PHPUnit\Framework\Warning $e, float $time) : void
 

A warning occurred.

public endTest(PHPUnit\Framework\Test $test, float $time) : void
 

A test ended.

public endTestSuite(PHPUnit\Framework\TestSuite $suite) : void
 

A testsuite ended.

public PHPUnit\Util\Printer::flush() : void
 

Flush buffer and close output if it's not to a PHP stream

public PHPUnit\Util\Printer::getAutoFlush() : bool
 

Check auto-flush mode.

public PHPUnit\Util\Printer::incrementalFlush() : void
 

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.

public printResult(PHPUnit\Framework\TestResult $result) : void
 
  • throws SebastianBergmann\Timer\RuntimeException
public PHPUnit\Util\Printer::setAutoFlush(bool $autoFlush) : void
 

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.

public startTest(PHPUnit\Framework\Test $test) : void
 

A test started.

public startTestSuite(PHPUnit\Framework\TestSuite $suite) : void
 

A testsuite started.

public PHPUnit\Util\Printer::write(string $buffer) : void
Properties
protected PHPUnit\Util\Printer::$autoFlush
 

If true, flush output after every write.

  • var bool
protected $colors
 
  • var bool
protected $column
 
  • var int
protected $debug
 
  • var bool
protected $lastTestFailed
 
  • var bool
protected $maxColumn
 
  • var int
protected $numAssertions
 
  • var int
protected $numTests
 
  • var int
protected $numTestsRun
 
  • var int
protected $numTestsWidth
 
  • var int
protected PHPUnit\Util\Printer::$out
 
  • var resource
protected PHPUnit\Util\Printer::$outTarget
 
  • var string
protected $verbose
 
  • var bool
Methods
protected colorizeTextBox(string $color, string $buffer) : string
 

Formats a buffer with a specified ANSI color sequence if colors are
enabled.

protected printDefect(PHPUnit\Framework\TestFailure $defect, int $count) : void
protected printDefectHeader(PHPUnit\Framework\TestFailure $defect, int $count) : void
protected printDefects(array $defects, string $type) : void
protected printDefectTrace(PHPUnit\Framework\TestFailure $defect) : void
protected printErrors(PHPUnit\Framework\TestResult $result) : void
protected printFailures(PHPUnit\Framework\TestResult $result) : void
protected printFooter(PHPUnit\Framework\TestResult $result) : void
protected printHeader() : void
 
  • throws SebastianBergmann\Timer\RuntimeException
protected printIncompletes(PHPUnit\Framework\TestResult $result) : void
protected printRisky(PHPUnit\Framework\TestResult $result) : void
protected printSkipped(PHPUnit\Framework\TestResult $result) : void
protected printWarnings(PHPUnit\Framework\TestResult $result) : void
protected writeNewLine() : void
protected writeProgress(string $progress) : void
protected writeProgressWithColor(string $color, string $buffer) : void
 

Writes progress with a color sequence if colors are enabled.

protected writeWithColor(string $color, string $buffer, bool $lf = true) : void
 

Writes a buffer out with a color sequence if colors are enabled.

Constants
private PHPUnit\TextUI\ResultPrinter::AVAILABLE_COLORS = ['never', 'auto', 'always']
Properties
private $defectListPrinted
 
  • var bool
private $numberOfColumns
 
  • var int
private $reverse
 
  • var bool
Methods
private writeCountString(int $count, string $name, string $color, bool $always = false) : void
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only