PHP 클래스 ParaTest\Runners\PHPUnit\ResultPrinter

Used for outputing ParaTest results
파일 보기 프로젝트 열기: brianium/paratest 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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