|
|
| $passed = [] |
| |
|
| $errors = [] |
| |
|
| $failures = [] |
| |
|
| $warnings = [] |
| |
|
| $notImplemented = [] |
| |
|
| $risky = [] |
| |
|
| $skipped = [] |
| |
|
| $listeners = [] |
| |
|
| $runTests = 0 |
| |
|
| $time = 0 |
| |
|
| $topTestSuite |
| |
|
| $codeCoverage |
| |
|
| $convertErrorsToExceptions = true |
| |
|
| $stop = false |
| |
|
| $stopOnError = false |
| |
|
| $stopOnFailure = false |
| |
|
| $stopOnWarning = false |
| |
|
| $beStrictAboutTestsThatDoNotTestAnything = true |
| |
|
| $beStrictAboutOutputDuringTests = false |
| |
|
| $beStrictAboutTodoAnnotatedTests = false |
| |
|
| $beStrictAboutResourceUsageDuringSmallTests = false |
| |
|
| $enforceTimeLimit = false |
| |
|
| $timeoutForSmallTests = 1 |
| |
|
| $timeoutForMediumTests = 10 |
| |
|
| $timeoutForLargeTests = 60 |
| |
|
| $stopOnRisky = false |
| |
|
| $stopOnIncomplete = false |
| |
|
| $stopOnSkipped = false |
| |
|
| $lastTestFailed = false |
| |
A TestResult collects the results of executing a test case.
◆ addError()
| PHPUnit\Framework\TestResult::addError |
( |
Test |
$test, |
|
|
Throwable |
$t, |
|
|
|
$time |
|
) |
| |
Adds an error to the list of errors.
- Parameters
-
| Test | $test | |
| Throwable | $t | |
| float | $time | |
◆ addFailure()
Adds a failure to the list of failures. The passed in exception caused the failure.
- Parameters
-
◆ addListener()
| PHPUnit\Framework\TestResult::addListener |
( |
TestListener |
$listener | ) |
|
◆ addWarning()
| PHPUnit\Framework\TestResult::addWarning |
( |
Test |
$test, |
|
|
Warning |
$e, |
|
|
|
$time |
|
) |
| |
Adds a warning to the list of warnings. The passed in exception caused the warning.
- Parameters
-
◆ allCompletelyImplemented()
| PHPUnit\Framework\TestResult::allCompletelyImplemented |
( |
| ) |
|
Returns true if no incomplete test occurred.
- Returns
- bool
◆ allHarmless()
| PHPUnit\Framework\TestResult::allHarmless |
( |
| ) |
|
Returns true if no risky test occurred.
- Returns
- bool
◆ beStrictAboutOutputDuringTests()
| PHPUnit\Framework\TestResult::beStrictAboutOutputDuringTests |
( |
|
$flag | ) |
|
◆ beStrictAboutResourceUsageDuringSmallTests()
| PHPUnit\Framework\TestResult::beStrictAboutResourceUsageDuringSmallTests |
( |
|
$flag | ) |
|
◆ beStrictAboutTestsThatDoNotTestAnything()
| PHPUnit\Framework\TestResult::beStrictAboutTestsThatDoNotTestAnything |
( |
|
$flag | ) |
|
◆ beStrictAboutTodoAnnotatedTests()
| PHPUnit\Framework\TestResult::beStrictAboutTodoAnnotatedTests |
( |
|
$flag | ) |
|
◆ convertErrorsToExceptions()
| PHPUnit\Framework\TestResult::convertErrorsToExceptions |
( |
|
$flag | ) |
|
Enables or disables the error-to-exception conversion.
- Parameters
-
- Exceptions
-
◆ count()
| PHPUnit\Framework\TestResult::count |
( |
| ) |
|
Gets the number of run tests.
- Returns
- int
◆ endTest()
| PHPUnit\Framework\TestResult::endTest |
( |
Test |
$test, |
|
|
|
$time |
|
) |
| |
Informs the result that a test was completed.
- Parameters
-
◆ endTestSuite()
| PHPUnit\Framework\TestResult::endTestSuite |
( |
TestSuite |
$suite | ) |
|
Informs the result that a testsuite was completed.
- Parameters
-
◆ enforcesTimeLimit()
| PHPUnit\Framework\TestResult::enforcesTimeLimit |
( |
| ) |
|
◆ enforceTimeLimit()
| PHPUnit\Framework\TestResult::enforceTimeLimit |
( |
|
$flag | ) |
|
◆ errorCount()
| PHPUnit\Framework\TestResult::errorCount |
( |
| ) |
|
Gets the number of detected errors.
- Returns
- int
◆ errors()
| PHPUnit\Framework\TestResult::errors |
( |
| ) |
|
Returns an Enumeration for the errors.
- Returns
- array
◆ failureCount()
| PHPUnit\Framework\TestResult::failureCount |
( |
| ) |
|
Gets the number of detected failures.
- Returns
- int
◆ failures()
| PHPUnit\Framework\TestResult::failures |
( |
| ) |
|
Returns an Enumeration for the failures.
- Returns
- array
◆ flushListeners()
| PHPUnit\Framework\TestResult::flushListeners |
( |
| ) |
|
Flushes all flushable TestListeners.
◆ getCodeCoverage()
| PHPUnit\Framework\TestResult::getCodeCoverage |
( |
| ) |
|
Returns the code coverage object.
- Returns
- CodeCoverage
◆ getCollectCodeCoverageInformation()
| PHPUnit\Framework\TestResult::getCollectCodeCoverageInformation |
( |
| ) |
|
Returns whether code coverage information should be collected.
- Returns
- bool If code coverage should be collected
◆ getConvertErrorsToExceptions()
| PHPUnit\Framework\TestResult::getConvertErrorsToExceptions |
( |
| ) |
|
Returns the error-to-exception conversion setting.
- Returns
- bool
◆ getHierarchy()
| PHPUnit\Framework\TestResult::getHierarchy |
( |
|
$className, |
|
|
|
$asReflectionObjects = false |
|
) |
| |
|
protected |
Returns the class hierarchy for a given class.
- Parameters
-
| string | $className | |
| bool | $asReflectionObjects | |
- Returns
- array
◆ getTimeoutForLargeTests()
| PHPUnit\Framework\TestResult::getTimeoutForLargeTests |
( |
| ) |
|
Returns the set timeout for large tests.
- Returns
- int
◆ isStrictAboutOutputDuringTests()
| PHPUnit\Framework\TestResult::isStrictAboutOutputDuringTests |
( |
| ) |
|
◆ isStrictAboutResourceUsageDuringSmallTests()
| PHPUnit\Framework\TestResult::isStrictAboutResourceUsageDuringSmallTests |
( |
| ) |
|
◆ isStrictAboutTestsThatDoNotTestAnything()
| PHPUnit\Framework\TestResult::isStrictAboutTestsThatDoNotTestAnything |
( |
| ) |
|
◆ isStrictAboutTodoAnnotatedTests()
| PHPUnit\Framework\TestResult::isStrictAboutTodoAnnotatedTests |
( |
| ) |
|
◆ noneSkipped()
| PHPUnit\Framework\TestResult::noneSkipped |
( |
| ) |
|
Returns true if no test has been skipped.
- Returns
- bool
◆ notImplemented()
| PHPUnit\Framework\TestResult::notImplemented |
( |
| ) |
|
Returns an Enumeration for the incomplete tests.
- Returns
- array
◆ notImplementedCount()
| PHPUnit\Framework\TestResult::notImplementedCount |
( |
| ) |
|
Gets the number of incomplete tests.
- Returns
- int
◆ passed()
| PHPUnit\Framework\TestResult::passed |
( |
| ) |
|
Returns the names of the tests that have passed.
- Returns
- array
◆ removeListener()
| PHPUnit\Framework\TestResult::removeListener |
( |
TestListener |
$listener | ) |
|
◆ risky()
| PHPUnit\Framework\TestResult::risky |
( |
| ) |
|
Returns an Enumeration for the risky tests.
- Returns
- array
◆ riskyCount()
| PHPUnit\Framework\TestResult::riskyCount |
( |
| ) |
|
Gets the number of risky tests.
- Returns
- int
◆ run()
| PHPUnit\Framework\TestResult::run |
( |
Test |
$test | ) |
|
◆ setCodeCoverage()
| PHPUnit\Framework\TestResult::setCodeCoverage |
( |
CodeCoverage |
$codeCoverage | ) |
|
Sets the code coverage object.
- Parameters
-
| CodeCoverage | $codeCoverage | |
◆ setRegisterMockObjectsFromTestArgumentsRecursively()
| PHPUnit\Framework\TestResult::setRegisterMockObjectsFromTestArgumentsRecursively |
( |
|
$flag | ) |
|
◆ setTimeoutForLargeTests()
| PHPUnit\Framework\TestResult::setTimeoutForLargeTests |
( |
|
$timeout | ) |
|
Sets the timeout for large tests.
- Parameters
-
- Exceptions
-
◆ setTimeoutForMediumTests()
| PHPUnit\Framework\TestResult::setTimeoutForMediumTests |
( |
|
$timeout | ) |
|
Sets the timeout for medium tests.
- Parameters
-
- Exceptions
-
◆ setTimeoutForSmallTests()
| PHPUnit\Framework\TestResult::setTimeoutForSmallTests |
( |
|
$timeout | ) |
|
Sets the timeout for small tests.
- Parameters
-
- Exceptions
-
◆ shouldStop()
| PHPUnit\Framework\TestResult::shouldStop |
( |
| ) |
|
Checks whether the test run should stop.
- Returns
- bool
◆ skipped()
| PHPUnit\Framework\TestResult::skipped |
( |
| ) |
|
Returns an Enumeration for the skipped tests.
- Returns
- array
◆ skippedCount()
| PHPUnit\Framework\TestResult::skippedCount |
( |
| ) |
|
Gets the number of skipped tests.
- Returns
- int
◆ startTest()
| PHPUnit\Framework\TestResult::startTest |
( |
Test |
$test | ) |
|
Informs the result that a test will be started.
- Parameters
-
◆ startTestSuite()
| PHPUnit\Framework\TestResult::startTestSuite |
( |
TestSuite |
$suite | ) |
|
Informs the result that a testsuite will be started.
- Parameters
-
◆ stop()
| PHPUnit\Framework\TestResult::stop |
( |
| ) |
|
Marks that the test run should stop.
◆ stopOnError()
| PHPUnit\Framework\TestResult::stopOnError |
( |
|
$flag | ) |
|
Enables or disables the stopping when an error occurs.
- Parameters
-
- Exceptions
-
◆ stopOnFailure()
| PHPUnit\Framework\TestResult::stopOnFailure |
( |
|
$flag | ) |
|
Enables or disables the stopping when a failure occurs.
- Parameters
-
- Exceptions
-
◆ stopOnIncomplete()
| PHPUnit\Framework\TestResult::stopOnIncomplete |
( |
|
$flag | ) |
|
Enables or disables the stopping for incomplete tests.
- Parameters
-
- Exceptions
-
◆ stopOnRisky()
| PHPUnit\Framework\TestResult::stopOnRisky |
( |
|
$flag | ) |
|
Enables or disables the stopping for risky tests.
- Parameters
-
- Exceptions
-
◆ stopOnSkipped()
| PHPUnit\Framework\TestResult::stopOnSkipped |
( |
|
$flag | ) |
|
Enables or disables the stopping for skipped tests.
- Parameters
-
- Exceptions
-
◆ stopOnWarning()
| PHPUnit\Framework\TestResult::stopOnWarning |
( |
|
$flag | ) |
|
Enables or disables the stopping when a warning occurs.
- Parameters
-
- Exceptions
-
◆ time()
| PHPUnit\Framework\TestResult::time |
( |
| ) |
|
Returns the time spent running the tests.
- Returns
- float
◆ topTestSuite()
| PHPUnit\Framework\TestResult::topTestSuite |
( |
| ) |
|
Returns the (top) test suite.
- Returns
- TestSuite
◆ warningCount()
| PHPUnit\Framework\TestResult::warningCount |
( |
| ) |
|
Gets the number of detected warnings.
- Returns
- int
◆ warnings()
| PHPUnit\Framework\TestResult::warnings |
( |
| ) |
|
Returns an Enumeration for the warnings.
- Returns
- array
◆ wasSuccessful()
| PHPUnit\Framework\TestResult::wasSuccessful |
( |
| ) |
|
Returns whether the entire test was successful or not.
- Returns
- bool
The documentation for this class was generated from the following file:
- vendor/phpunit/phpunit/src/Framework/TestResult.php