PHP Класс ParaTest\Runners\PHPUnit\ResultPrinter

Used for outputing ParaTest results
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$casesProcessed integer The total number of cases printed so far
$colors boolean Whether to display a red or green bar
$column integer The current column being printed to
$maxColumn integer Used for formatting results to a given width
$numTestsWidth integer Used to determine when to tally current results and start a new row
$numberOfColumns integer Number of columns
$processSkipped boolean Do we need to try to process skipped/incompleted tests.
$results ParaTest\Logging\LogInterpreter
$suites array A collection of ExecutableTest objects
$timer PHP_Timer
$totalCases integer The total number of cases to be run
$totalSkippedOrIncomplete integer Number of skipped or incomplete tests
$warnings array Warnings generated by the cases

Открытые методы

Метод Описание
__construct ( LogInterpreter $results )
addTest ( ParaTest\Runners\PHPUnit\ExecutableTest $suite ) Adds an ExecutableTest to the tracked results
addWarnings ( array $warnings ) Add an array of warning strings. These cause the test run to be shown as failed
flush ( ) Prints all results and removes any log files used for aggregating results
getErrors ( ) : string Returns error messages
getFailures ( ) : string Returns the failure messages
getFooter ( ) : string Return the footer information reporting success or failure
getHeader ( ) : string Returns the header containing resource usage
getTotalCases ( ) : integer Returns the total cases being printed
getWarnings ( ) Returns warning messages as a string
isSuccessful ( ) : boolean Whether the test run is successful and has no warnings
printFeedback ( ParaTest\Runners\PHPUnit\ExecutableTest $test ) Prints the individual "quick" feedback for run tests, that is the ".EF" items
printResults ( ) Print final results
println ( string $string = "" )
start ( ParaTest\Runners\PHPUnit\Options $options ) Initializes printing constraints, prints header information and starts the test timer

Защищенные методы

Метод Описание
getDefects ( array $defects, $type ) : string Method that returns a formatted string for a collection of errors or failures
getProgress ( ) Prints progress for large test collections
isSkippedIncompleTestCanBeTracked ( $options ) : boolean Is skipped/incomplete amount can be properly processed.
printFeedbackItem ( $item ) Prints a single "quick" feedback item and increments the total number of processed cases and the column position
printSkippedAndIncomplete ( integer $actualTestCount, integer $expectedTestCount ) Prints S for skipped and incomplete tests.
printTestWarnings ( ParaTest\Runners\PHPUnit\ExecutableTest $test ) Prints test warnings.
processReaderFeedback ( ParaTest\Logging\JUnit\Reader $reader, integer $expectedTestCount ) Process reader feedback and print it.
processTestOverhead ( integer $actualTestCount, integer $expectedTestCount ) Process test overhead.

Приватные методы

Метод Описание
clearLogs ( ) Deletes all the temporary log files for ExecutableTest objects being printed
getFailedFooter ( ) : string Get the footer for a test collection that had tests with failures or errors
getSuccessFooter ( ) : string Get the footer for a test collection containing all successful tests
green ( $text )
red ( $text )

Описание методов

__construct() публичный Метод

public __construct ( LogInterpreter $results )
$results ParaTest\Logging\LogInterpreter

addTest() публичный Метод

Adds an ExecutableTest to the tracked results
public addTest ( ParaTest\Runners\PHPUnit\ExecutableTest $suite )
$suite ParaTest\Runners\PHPUnit\ExecutableTest

addWarnings() публичный Метод

Add an array of warning strings. These cause the test run to be shown as failed
public addWarnings ( array $warnings )
$warnings array

flush() публичный Метод

Prints all results and removes any log files used for aggregating results
public flush ( )

getDefects() защищенный Метод

Method that returns a formatted string for a collection of errors or failures
protected getDefects ( array $defects, $type ) : string
$defects array
$type
Результат string

getErrors() публичный Метод

Returns error messages
public getErrors ( ) : string
Результат string

getFailures() публичный Метод

Returns the failure messages
public getFailures ( ) : string
Результат string

getFooter() публичный Метод

Return the footer information reporting success or failure
public getFooter ( ) : string
Результат string

getHeader() публичный Метод

Returns the header containing resource usage
public getHeader ( ) : string
Результат string

getProgress() защищенный Метод

Prints progress for large test collections
protected getProgress ( )

getTotalCases() публичный Метод

Returns the total cases being printed
public getTotalCases ( ) : integer
Результат integer

getWarnings() публичный Метод

Returns warning messages as a string
public getWarnings ( )

isSkippedIncompleTestCanBeTracked() защищенный Метод

Is skipped/incomplete amount can be properly processed.
protected isSkippedIncompleTestCanBeTracked ( $options ) : boolean
Результат boolean

isSuccessful() публичный Метод

Whether the test run is successful and has no warnings
public isSuccessful ( ) : boolean
Результат boolean

printFeedback() публичный Метод

Prints the individual "quick" feedback for run tests, that is the ".EF" items
public printFeedback ( ParaTest\Runners\PHPUnit\ExecutableTest $test )
$test ParaTest\Runners\PHPUnit\ExecutableTest

printFeedbackItem() защищенный Метод

Prints a single "quick" feedback item and increments the total number of processed cases and the column position
protected printFeedbackItem ( $item )
$item

printResults() публичный Метод

Print final results
public printResults ( )

printSkippedAndIncomplete() защищенный Метод

If for some reason process return less tests than expected then we threat all remaining as skipped or incomplete and print them as skipped (S letter)
protected printSkippedAndIncomplete ( integer $actualTestCount, integer $expectedTestCount )
$actualTestCount integer
$expectedTestCount integer

printTestWarnings() защищенный Метод

Prints test warnings.
protected printTestWarnings ( ParaTest\Runners\PHPUnit\ExecutableTest $test )
$test ParaTest\Runners\PHPUnit\ExecutableTest

println() публичный Метод

public println ( string $string = "" )
$string string

processReaderFeedback() защищенный Метод

Process reader feedback and print it.
protected processReaderFeedback ( ParaTest\Logging\JUnit\Reader $reader, integer $expectedTestCount )
$reader ParaTest\Logging\JUnit\Reader
$expectedTestCount integer

processTestOverhead() защищенный Метод

In some situations phpunit can return more tests then we expect and in that case this method correct total amount of tests so paratest progress will be auto corrected.
protected processTestOverhead ( integer $actualTestCount, integer $expectedTestCount )
$actualTestCount integer
$expectedTestCount integer

start() публичный Метод

Initializes printing constraints, prints header information and starts the test timer
public start ( ParaTest\Runners\PHPUnit\Options $options )
$options ParaTest\Runners\PHPUnit\Options

Описание свойств

$casesProcessed защищенное свойство

The total number of cases printed so far
protected int $casesProcessed
Результат integer

$colors защищенное свойство

Whether to display a red or green bar
protected bool $colors
Результат boolean

$column защищенное свойство

The current column being printed to
protected int $column
Результат integer

$maxColumn защищенное свойство

Used for formatting results to a given width
protected int $maxColumn
Результат integer

$numTestsWidth защищенное свойство

Used to determine when to tally current results and start a new row
protected int $numTestsWidth
Результат integer

$numberOfColumns защищенное свойство

Number of columns
protected int $numberOfColumns
Результат integer

$processSkipped защищенное свойство

Do we need to try to process skipped/incompleted tests.
protected bool $processSkipped
Результат boolean

$results защищенное свойство

protected LogInterpreter,ParaTest\Logging $results
Результат ParaTest\Logging\LogInterpreter

$suites защищенное свойство

A collection of ExecutableTest objects
protected array $suites
Результат array

$timer защищенное свойство

protected PHP_Timer $timer
Результат PHP_Timer

$totalCases защищенное свойство

The total number of cases to be run
protected int $totalCases
Результат integer

$totalSkippedOrIncomplete защищенное свойство

Number of skipped or incomplete tests
protected int $totalSkippedOrIncomplete
Результат integer

$warnings защищенное свойство

Warnings generated by the cases
protected array $warnings
Результат array