PHP 클래스 PHPUnit_Framework_TestResult, phpunit

저자: Sebastian Bergmann ([email protected])
상속: implements Countable
파일 보기 프로젝트 열기: sebastianbergmann/phpunit 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$beStrictAboutOutputDuringTests boolean
$beStrictAboutResourceUsageDuringSmallTests boolean
$beStrictAboutTestsThatDoNotTestAnything boolean
$beStrictAboutTodoAnnotatedTests boolean
$codeCoverage SebastianBergmann\CodeCoverage\CodeCoverage Code Coverage information.
$convertErrorsToExceptions boolean
$enforceTimeLimit boolean
$errors array
$failures array
$lastTestFailed boolean
$listeners array
$notImplemented array
$passed array
$risky array
$runTests integer
$skipped array
$stop boolean
$stopOnError boolean
$stopOnFailure boolean
$stopOnIncomplete boolean
$stopOnRisky boolean
$stopOnSkipped boolean
$stopOnWarning boolean
$time float
$timeoutForLargeTests integer
$timeoutForMediumTests integer
$timeoutForSmallTests integer
$topTestSuite PHPUnit_Framework_TestSuite
$warnings array

공개 메소드들

메소드 설명
addError ( PHPUnit_Framework_Test $test, Throwable $t, float $time ) Adds an error to the list of errors.
addFailure ( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, float $time ) Adds a failure to the list of failures.
addListener ( PHPUnit_Framework_TestListener $listener ) Registers a TestListener.
addWarning ( PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time ) Adds a warning to the list of warnings.
allCompletelyImplemented ( ) : boolean Returns true if no incomplete test occurred.
allHarmless ( ) : boolean Returns true if no risky test occurred.
beStrictAboutOutputDuringTests ( boolean $flag )
beStrictAboutResourceUsageDuringSmallTests ( boolean $flag )
beStrictAboutTestsThatDoNotTestAnything ( boolean $flag )
beStrictAboutTodoAnnotatedTests ( boolean $flag )
convertErrorsToExceptions ( boolean $flag ) Enables or disables the error-to-exception conversion.
count ( ) : integer Gets the number of run tests.
endTest ( PHPUnit_Framework_Test $test, float $time ) Informs the result that a test was completed.
endTestSuite ( PHPUnit_Framework_TestSuite $suite ) Informs the result that a testsuite was completed.
enforceTimeLimit ( boolean $flag )
enforcesTimeLimit ( ) : boolean
errorCount ( ) : integer Gets the number of detected errors.
errors ( ) : array Returns an Enumeration for the errors.
failureCount ( ) : integer Gets the number of detected failures.
failures ( ) : array Returns an Enumeration for the failures.
flushListeners ( ) Flushes all flushable TestListeners.
getCodeCoverage ( ) : SebastianBergmann\CodeCoverage\CodeCoverage Returns the code coverage object.
getCollectCodeCoverageInformation ( ) : boolean Returns whether code coverage information should be collected.
getConvertErrorsToExceptions ( ) : boolean Returns the error-to-exception conversion setting.
getTimeoutForLargeTests ( ) : integer Returns the set timeout for large tests.
isStrictAboutOutputDuringTests ( ) : boolean
isStrictAboutResourceUsageDuringSmallTests ( ) : boolean
isStrictAboutTestsThatDoNotTestAnything ( ) : boolean
isStrictAboutTodoAnnotatedTests ( ) : boolean
noneSkipped ( ) : boolean Returns true if no test has been skipped.
notImplemented ( ) : array Returns an Enumeration for the incomplete tests.
notImplementedCount ( ) : integer Gets the number of incomplete tests.
passed ( ) : array Returns the names of the tests that have passed.
removeListener ( PHPUnit_Framework_TestListener $listener ) Unregisters a TestListener.
risky ( ) : array Returns an Enumeration for the risky tests.
riskyCount ( ) : integer Gets the number of risky tests.
run ( PHPUnit_Framework_Test $test ) Runs a TestCase.
setCodeCoverage ( SebastianBergmann\CodeCoverage\CodeCoverage $codeCoverage ) Sets the code coverage object.
setRegisterMockObjectsFromTestArgumentsRecursively ( boolean $flag )
setTimeoutForLargeTests ( integer $timeout ) Sets the timeout for large tests.
setTimeoutForMediumTests ( integer $timeout ) Sets the timeout for medium tests.
setTimeoutForSmallTests ( integer $timeout ) Sets the timeout for small tests.
shouldStop ( ) : boolean Checks whether the test run should stop.
skipped ( ) : array Returns an Enumeration for the skipped tests.
skippedCount ( ) : integer Gets the number of skipped tests.
startTest ( PHPUnit_Framework_Test $test ) Informs the result that a test will be started.
startTestSuite ( PHPUnit_Framework_TestSuite $suite ) Informs the result that a testsuite will be started.
stop ( ) Marks that the test run should stop.
stopOnError ( boolean $flag ) Enables or disables the stopping when an error occurs.
stopOnFailure ( boolean $flag ) Enables or disables the stopping when a failure occurs.
stopOnIncomplete ( boolean $flag ) Enables or disables the stopping for incomplete tests.
stopOnRisky ( boolean $flag ) Enables or disables the stopping for risky tests.
stopOnSkipped ( boolean $flag ) Enables or disables the stopping for skipped tests.
stopOnWarning ( boolean $flag ) Enables or disables the stopping when a warning occurs.
time ( ) : float Returns the time spent running the tests.
topTestSuite ( ) : PHPUnit_Framework_TestSuite Returns the (top) test suite.
warningCount ( ) : integer Gets the number of detected warnings.
warnings ( ) : array Returns an Enumeration for the warnings.
wasSuccessful ( ) : boolean Returns whether the entire test was successful or not.

보호된 메소드들

메소드 설명
getHierarchy ( string $className, boolean $asReflectionObjects = false ) : array Returns the class hierarchy for a given class.

메소드 상세

addError() 공개 메소드

Adds an error to the list of errors.
public addError ( PHPUnit_Framework_Test $test, Throwable $t, float $time )
$test PHPUnit_Framework_Test
$t Throwable
$time float

addFailure() 공개 메소드

The passed in exception caused the failure.
public addFailure ( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, float $time )
$test PHPUnit_Framework_Test
$e PHPUnit_Framework_AssertionFailedError
$time float

addListener() 공개 메소드

Registers a TestListener.
public addListener ( PHPUnit_Framework_TestListener $listener )
$listener PHPUnit_Framework_TestListener

addWarning() 공개 메소드

The passed in exception caused the warning.
public addWarning ( PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time )
$test PHPUnit_Framework_Test
$e PHPUnit_Framework_Warning
$time float

allCompletelyImplemented() 공개 메소드

Returns true if no incomplete test occurred.

allHarmless() 공개 메소드

Returns true if no risky test occurred.
public allHarmless ( ) : boolean
리턴 boolean

beStrictAboutOutputDuringTests() 공개 메소드

beStrictAboutResourceUsageDuringSmallTests() 공개 메소드

beStrictAboutTestsThatDoNotTestAnything() 공개 메소드

beStrictAboutTodoAnnotatedTests() 공개 메소드

convertErrorsToExceptions() 공개 메소드

Enables or disables the error-to-exception conversion.
public convertErrorsToExceptions ( boolean $flag )
$flag boolean

count() 공개 메소드

Gets the number of run tests.
public count ( ) : integer
리턴 integer

endTest() 공개 메소드

Informs the result that a test was completed.
public endTest ( PHPUnit_Framework_Test $test, float $time )
$test PHPUnit_Framework_Test
$time float

endTestSuite() 공개 메소드

Informs the result that a testsuite was completed.
public endTestSuite ( PHPUnit_Framework_TestSuite $suite )
$suite PHPUnit_Framework_TestSuite

enforceTimeLimit() 공개 메소드

public enforceTimeLimit ( boolean $flag )
$flag boolean

enforcesTimeLimit() 공개 메소드

public enforcesTimeLimit ( ) : boolean
리턴 boolean

errorCount() 공개 메소드

Gets the number of detected errors.
public errorCount ( ) : integer
리턴 integer

errors() 공개 메소드

Returns an Enumeration for the errors.
public errors ( ) : array
리턴 array

failureCount() 공개 메소드

Gets the number of detected failures.
public failureCount ( ) : integer
리턴 integer

failures() 공개 메소드

Returns an Enumeration for the failures.
public failures ( ) : array
리턴 array

flushListeners() 공개 메소드

Flushes all flushable TestListeners.
public flushListeners ( )

getCodeCoverage() 공개 메소드

Returns the code coverage object.
public getCodeCoverage ( ) : SebastianBergmann\CodeCoverage\CodeCoverage
리턴 SebastianBergmann\CodeCoverage\CodeCoverage

getCollectCodeCoverageInformation() 공개 메소드

Returns whether code coverage information should be collected.
public getCollectCodeCoverageInformation ( ) : boolean
리턴 boolean If code coverage should be collected

getConvertErrorsToExceptions() 공개 메소드

Returns the error-to-exception conversion setting.

getHierarchy() 보호된 메소드

Returns the class hierarchy for a given class.
protected getHierarchy ( string $className, boolean $asReflectionObjects = false ) : array
$className string
$asReflectionObjects boolean
리턴 array

getTimeoutForLargeTests() 공개 메소드

Returns the set timeout for large tests.

isStrictAboutOutputDuringTests() 공개 메소드

isStrictAboutResourceUsageDuringSmallTests() 공개 메소드

isStrictAboutTestsThatDoNotTestAnything() 공개 메소드

isStrictAboutTodoAnnotatedTests() 공개 메소드

noneSkipped() 공개 메소드

Returns true if no test has been skipped.
public noneSkipped ( ) : boolean
리턴 boolean

notImplemented() 공개 메소드

Returns an Enumeration for the incomplete tests.
public notImplemented ( ) : array
리턴 array

notImplementedCount() 공개 메소드

Gets the number of incomplete tests.
public notImplementedCount ( ) : integer
리턴 integer

passed() 공개 메소드

Returns the names of the tests that have passed.
public passed ( ) : array
리턴 array

removeListener() 공개 메소드

Unregisters a TestListener.
public removeListener ( PHPUnit_Framework_TestListener $listener )
$listener PHPUnit_Framework_TestListener

risky() 공개 메소드

Returns an Enumeration for the risky tests.
public risky ( ) : array
리턴 array

riskyCount() 공개 메소드

Gets the number of risky tests.
public riskyCount ( ) : integer
리턴 integer

run() 공개 메소드

Runs a TestCase.
public run ( PHPUnit_Framework_Test $test )
$test PHPUnit_Framework_Test

setCodeCoverage() 공개 메소드

Sets the code coverage object.
public setCodeCoverage ( SebastianBergmann\CodeCoverage\CodeCoverage $codeCoverage )
$codeCoverage SebastianBergmann\CodeCoverage\CodeCoverage

setRegisterMockObjectsFromTestArgumentsRecursively() 공개 메소드

setTimeoutForLargeTests() 공개 메소드

Sets the timeout for large tests.
public setTimeoutForLargeTests ( integer $timeout )
$timeout integer

setTimeoutForMediumTests() 공개 메소드

Sets the timeout for medium tests.
public setTimeoutForMediumTests ( integer $timeout )
$timeout integer

setTimeoutForSmallTests() 공개 메소드

Sets the timeout for small tests.
public setTimeoutForSmallTests ( integer $timeout )
$timeout integer

shouldStop() 공개 메소드

Checks whether the test run should stop.
public shouldStop ( ) : boolean
리턴 boolean

skipped() 공개 메소드

Returns an Enumeration for the skipped tests.
public skipped ( ) : array
리턴 array

skippedCount() 공개 메소드

Gets the number of skipped tests.
public skippedCount ( ) : integer
리턴 integer

startTest() 공개 메소드

Informs the result that a test will be started.
public startTest ( PHPUnit_Framework_Test $test )
$test PHPUnit_Framework_Test

startTestSuite() 공개 메소드

Informs the result that a testsuite will be started.
public startTestSuite ( PHPUnit_Framework_TestSuite $suite )
$suite PHPUnit_Framework_TestSuite

stop() 공개 메소드

Marks that the test run should stop.
public stop ( )

stopOnError() 공개 메소드

Enables or disables the stopping when an error occurs.
public stopOnError ( boolean $flag )
$flag boolean

stopOnFailure() 공개 메소드

Enables or disables the stopping when a failure occurs.
public stopOnFailure ( boolean $flag )
$flag boolean

stopOnIncomplete() 공개 메소드

Enables or disables the stopping for incomplete tests.
public stopOnIncomplete ( boolean $flag )
$flag boolean

stopOnRisky() 공개 메소드

Enables or disables the stopping for risky tests.
public stopOnRisky ( boolean $flag )
$flag boolean

stopOnSkipped() 공개 메소드

Enables or disables the stopping for skipped tests.
public stopOnSkipped ( boolean $flag )
$flag boolean

stopOnWarning() 공개 메소드

Enables or disables the stopping when a warning occurs.
public stopOnWarning ( boolean $flag )
$flag boolean

time() 공개 메소드

Returns the time spent running the tests.
public time ( ) : float
리턴 float

topTestSuite() 공개 메소드

Returns the (top) test suite.
public topTestSuite ( ) : PHPUnit_Framework_TestSuite
리턴 PHPUnit_Framework_TestSuite

warningCount() 공개 메소드

Gets the number of detected warnings.
public warningCount ( ) : integer
리턴 integer

warnings() 공개 메소드

Returns an Enumeration for the warnings.
public warnings ( ) : array
리턴 array

wasSuccessful() 공개 메소드

Returns whether the entire test was successful or not.
public wasSuccessful ( ) : boolean
리턴 boolean

프로퍼티 상세

$beStrictAboutOutputDuringTests 보호되어 있는 프로퍼티

protected bool $beStrictAboutOutputDuringTests
리턴 boolean

$beStrictAboutResourceUsageDuringSmallTests 보호되어 있는 프로퍼티

protected bool $beStrictAboutResourceUsageDuringSmallTests
리턴 boolean

$beStrictAboutTestsThatDoNotTestAnything 보호되어 있는 프로퍼티

protected bool $beStrictAboutTestsThatDoNotTestAnything
리턴 boolean

$beStrictAboutTodoAnnotatedTests 보호되어 있는 프로퍼티

protected bool $beStrictAboutTodoAnnotatedTests
리턴 boolean

$codeCoverage 보호되어 있는 프로퍼티

Code Coverage information.
protected CodeCoverage,SebastianBergmann\CodeCoverage $codeCoverage
리턴 SebastianBergmann\CodeCoverage\CodeCoverage

$convertErrorsToExceptions 보호되어 있는 프로퍼티

protected bool $convertErrorsToExceptions
리턴 boolean

$enforceTimeLimit 보호되어 있는 프로퍼티

protected bool $enforceTimeLimit
리턴 boolean

$errors 보호되어 있는 프로퍼티

protected array $errors
리턴 array

$failures 보호되어 있는 프로퍼티

protected array $failures
리턴 array

$lastTestFailed 보호되어 있는 프로퍼티

protected bool $lastTestFailed
리턴 boolean

$listeners 보호되어 있는 프로퍼티

protected array $listeners
리턴 array

$notImplemented 보호되어 있는 프로퍼티

protected array $notImplemented
리턴 array

$passed 보호되어 있는 프로퍼티

protected array $passed
리턴 array

$risky 보호되어 있는 프로퍼티

protected array $risky
리턴 array

$runTests 보호되어 있는 프로퍼티

protected int $runTests
리턴 integer

$skipped 보호되어 있는 프로퍼티

protected array $skipped
리턴 array

$stop 보호되어 있는 프로퍼티

protected bool $stop
리턴 boolean

$stopOnError 보호되어 있는 프로퍼티

protected bool $stopOnError
리턴 boolean

$stopOnFailure 보호되어 있는 프로퍼티

protected bool $stopOnFailure
리턴 boolean

$stopOnIncomplete 보호되어 있는 프로퍼티

protected bool $stopOnIncomplete
리턴 boolean

$stopOnRisky 보호되어 있는 프로퍼티

protected bool $stopOnRisky
리턴 boolean

$stopOnSkipped 보호되어 있는 프로퍼티

protected bool $stopOnSkipped
리턴 boolean

$stopOnWarning 보호되어 있는 프로퍼티

protected bool $stopOnWarning
리턴 boolean

$time 보호되어 있는 프로퍼티

protected float $time
리턴 float

$timeoutForLargeTests 보호되어 있는 프로퍼티

protected int $timeoutForLargeTests
리턴 integer

$timeoutForMediumTests 보호되어 있는 프로퍼티

protected int $timeoutForMediumTests
리턴 integer

$timeoutForSmallTests 보호되어 있는 프로퍼티

protected int $timeoutForSmallTests
리턴 integer

$topTestSuite 보호되어 있는 프로퍼티

protected PHPUnit_Framework_TestSuite $topTestSuite
리턴 PHPUnit_Framework_TestSuite

$warnings 보호되어 있는 프로퍼티

protected array $warnings
리턴 array