PHP Class PHPUnit_TextUI_ResultPrinter, phpunit

Author: Sebastian Bergmann ([email protected])
Inheritance: extends PHPUnit_Util_Printer, implements PHPUnit_Framework_TestListener
Afficher le fichier Open project: sebastianbergmann/phpunit Class Usage Examples

Protected Properties

Свойство Type Description
$colors boolean
$column integer
$debug boolean
$lastTestFailed boolean
$maxColumn integer
$numAssertions integer
$numTests integer
$numTestsRun integer
$numTestsWidth integer
$verbose boolean

Méthodes publiques

Méthode Description
__construct ( mixed $out = null, boolean $verbose = false, string $colors = self::COLOR_DEFAULT, boolean $debug = false, integer | string $numberOfColumns = 80, boolean $reverse = false ) Constructor.
addError ( PHPUnit_Framework_Test $test, Exception $e, float $time ) An error 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.
addWarning ( PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time ) A warning occurred.
endTest ( PHPUnit_Framework_Test $test, float $time ) A test ended.
endTestSuite ( PHPUnit_Framework_TestSuite $suite ) A testsuite ended.
printResult ( PHPUnit_Framework_TestResult $result )
printWaitPrompt ( )
startTest ( PHPUnit_Framework_Test $test ) A test started.
startTestSuite ( PHPUnit_Framework_TestSuite $suite ) A testsuite started.

Méthodes protégées

Méthode Description
formatWithColor ( string $color, string $buffer ) : string Formats a buffer with a specified ANSI color sequence if colors are enabled.
printDefect ( PHPUnit_Framework_TestFailure $defect, integer $count )
printDefectHeader ( PHPUnit_Framework_TestFailure $defect, integer $count )
printDefectTrace ( PHPUnit_Framework_TestFailure $defect )
printDefects ( array $defects, string $type )
printErrors ( PHPUnit_Framework_TestResult $result )
printFailures ( PHPUnit_Framework_TestResult $result )
printFooter ( PHPUnit_Framework_TestResult $result )
printHeader ( )
printIncompletes ( PHPUnit_Framework_TestResult $result )
printRisky ( PHPUnit_Framework_TestResult $result )
printSkipped ( PHPUnit_Framework_TestResult $result )
printWarnings ( PHPUnit_Framework_TestResult $result )
writeNewLine ( )
writeProgress ( string $progress )
writeProgressWithColor ( string $color, string $buffer ) Writes progress with a color sequence if colors are enabled.
writeWithColor ( string $color, string $buffer, boolean $lf = true ) Writes a buffer out with a color sequence if colors are enabled.

Private Methods

Méthode Description
writeCountString ( integer $count, string $name, string $color, boolean $always = false )

Method Details

__construct() public méthode

Constructor.
public __construct ( mixed $out = null, boolean $verbose = false, string $colors = self::COLOR_DEFAULT, boolean $debug = false, integer | string $numberOfColumns = 80, boolean $reverse = false )
$out mixed
$verbose boolean
$colors string
$debug boolean
$numberOfColumns integer | string
$reverse boolean

addError() public méthode

An error occurred.
public addError ( PHPUnit_Framework_Test $test, Exception $e, float $time )
$test PHPUnit_Framework_Test
$e Exception
$time float

addFailure() public méthode

A failure occurred.
public addFailure ( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, float $time )
$test PHPUnit_Framework_Test
$e PHPUnit_Framework_AssertionFailedError
$time float

addIncompleteTest() public méthode

Incomplete test.
public addIncompleteTest ( PHPUnit_Framework_Test $test, Exception $e, float $time )
$test PHPUnit_Framework_Test
$e Exception
$time float

addRiskyTest() public méthode

Risky test.
public addRiskyTest ( PHPUnit_Framework_Test $test, Exception $e, float $time )
$test PHPUnit_Framework_Test
$e Exception
$time float

addSkippedTest() public méthode

Skipped test.
public addSkippedTest ( PHPUnit_Framework_Test $test, Exception $e, float $time )
$test PHPUnit_Framework_Test
$e Exception
$time float

addWarning() public méthode

A warning occurred.
public addWarning ( PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time )
$test PHPUnit_Framework_Test
$e PHPUnit_Framework_Warning
$time float

endTest() public méthode

A test ended.
public endTest ( PHPUnit_Framework_Test $test, float $time )
$test PHPUnit_Framework_Test
$time float

endTestSuite() public méthode

A testsuite ended.
public endTestSuite ( PHPUnit_Framework_TestSuite $suite )
$suite PHPUnit_Framework_TestSuite

formatWithColor() protected méthode

Formats a buffer with a specified ANSI color sequence if colors are enabled.
protected formatWithColor ( string $color, string $buffer ) : string
$color string
$buffer string
Résultat string

printDefect() protected méthode

protected printDefect ( PHPUnit_Framework_TestFailure $defect, integer $count )
$defect PHPUnit_Framework_TestFailure
$count integer

printDefectHeader() protected méthode

protected printDefectHeader ( PHPUnit_Framework_TestFailure $defect, integer $count )
$defect PHPUnit_Framework_TestFailure
$count integer

printDefectTrace() protected méthode

protected printDefectTrace ( PHPUnit_Framework_TestFailure $defect )
$defect PHPUnit_Framework_TestFailure

printDefects() protected méthode

protected printDefects ( array $defects, string $type )
$defects array
$type string

printErrors() protected méthode

protected printErrors ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult

printFailures() protected méthode

protected printFailures ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult

printFooter() protected méthode

protected printFooter ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult

printHeader() protected méthode

protected printHeader ( )

printIncompletes() protected méthode

protected printIncompletes ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult

printResult() public méthode

public printResult ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult

printRisky() protected méthode

protected printRisky ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult

printSkipped() protected méthode

protected printSkipped ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult

printWaitPrompt() public méthode

public printWaitPrompt ( )

printWarnings() protected méthode

protected printWarnings ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult

startTest() public méthode

A test started.
public startTest ( PHPUnit_Framework_Test $test )
$test PHPUnit_Framework_Test

startTestSuite() public méthode

A testsuite started.
public startTestSuite ( PHPUnit_Framework_TestSuite $suite )
$suite PHPUnit_Framework_TestSuite

writeNewLine() protected méthode

protected writeNewLine ( )

writeProgress() protected méthode

protected writeProgress ( string $progress )
$progress string

writeProgressWithColor() protected méthode

Writes progress with a color sequence if colors are enabled.
protected writeProgressWithColor ( string $color, string $buffer )
$color string
$buffer string

writeWithColor() protected méthode

Writes a buffer out with a color sequence if colors are enabled.
protected writeWithColor ( string $color, string $buffer, boolean $lf = true )
$color string
$buffer string
$lf boolean

Property Details

$colors protected_oe property

protected bool $colors
Résultat boolean

$column protected_oe property

protected int $column
Résultat integer

$debug protected_oe property

protected bool $debug
Résultat boolean

$lastTestFailed protected_oe property

protected bool $lastTestFailed
Résultat boolean

$maxColumn protected_oe property

protected int $maxColumn
Résultat integer

$numAssertions protected_oe property

protected int $numAssertions
Résultat integer

$numTests protected_oe property

protected int $numTests
Résultat integer

$numTestsRun protected_oe property

protected int $numTestsRun
Résultat integer

$numTestsWidth protected_oe property

protected int $numTestsWidth
Résultat integer

$verbose protected_oe property

protected bool $verbose
Résultat boolean