file-fetcher
Public Member Functions | List of all members
PHPUnit\Framework\TestResult Class Reference
Inheritance diagram for PHPUnit\Framework\TestResult:

Public Member Functions

 addListener (TestListener $listener)
 
 removeListener (TestListener $listener)
 
 flushListeners ()
 
 addError (Test $test, Throwable $t, float $time)
 
 addWarning (Test $test, Warning $e, float $time)
 
 addFailure (Test $test, AssertionFailedError $e, float $time)
 
 startTestSuite (TestSuite $suite)
 
 endTestSuite (TestSuite $suite)
 
 startTest (Test $test)
 
 endTest (Test $test, float $time)
 
 allHarmless ()
 
 riskyCount ()
 
 allCompletelyImplemented ()
 
 notImplementedCount ()
 
 risky ()
 
 notImplemented ()
 
 noneSkipped ()
 
 skippedCount ()
 
 skipped ()
 
 errorCount ()
 
 errors ()
 
 failureCount ()
 
 failures ()
 
 warningCount ()
 
 warnings ()
 
 passed ()
 
 topTestSuite ()
 
 getCollectCodeCoverageInformation ()
 
 run (Test $test)
 
 count ()
 
 shouldStop ()
 
 stop ()
 
 getCodeCoverage ()
 
 setCodeCoverage (CodeCoverage $codeCoverage)
 
 convertDeprecationsToExceptions (bool $flag)
 
 getConvertDeprecationsToExceptions ()
 
 convertErrorsToExceptions (bool $flag)
 
 getConvertErrorsToExceptions ()
 
 convertNoticesToExceptions (bool $flag)
 
 getConvertNoticesToExceptions ()
 
 convertWarningsToExceptions (bool $flag)
 
 getConvertWarningsToExceptions ()
 
 stopOnError (bool $flag)
 
 stopOnFailure (bool $flag)
 
 stopOnWarning (bool $flag)
 
 beStrictAboutTestsThatDoNotTestAnything (bool $flag)
 
 isStrictAboutTestsThatDoNotTestAnything ()
 
 beStrictAboutOutputDuringTests (bool $flag)
 
 isStrictAboutOutputDuringTests ()
 
 beStrictAboutResourceUsageDuringSmallTests (bool $flag)
 
 isStrictAboutResourceUsageDuringSmallTests ()
 
 enforceTimeLimit (bool $flag)
 
 enforcesTimeLimit ()
 
 beStrictAboutTodoAnnotatedTests (bool $flag)
 
 isStrictAboutTodoAnnotatedTests ()
 
 stopOnRisky (bool $flag)
 
 stopOnIncomplete (bool $flag)
 
 stopOnSkipped (bool $flag)
 
 stopOnDefect (bool $flag)
 
 time ()
 
 wasSuccessful ()
 
 wasSuccessfulIgnoringWarnings ()
 
 wasSuccessfulAndNoTestIsRiskyOrSkippedOrIncomplete ()
 
 setDefaultTimeLimit (int $timeout)
 
 setTimeoutForSmallTests (int $timeout)
 
 setTimeoutForMediumTests (int $timeout)
 
 setTimeoutForLargeTests (int $timeout)
 
 getTimeoutForLargeTests ()
 
 setRegisterMockObjectsFromTestArgumentsRecursively (bool $flag)
 

Member Function Documentation

◆ addError()

PHPUnit\Framework\TestResult::addError ( Test  $test,
Throwable  $t,
float  $time 
)

Adds an error to the list of errors.

◆ addFailure()

PHPUnit\Framework\TestResult::addFailure ( Test  $test,
AssertionFailedError  $e,
float  $time 
)

Adds a failure to the list of failures. The passed in exception caused the failure.

◆ addListener()

PHPUnit\Framework\TestResult::addListener ( TestListener  $listener)
Deprecated:
Use the TestHook interfaces instead

@codeCoverageIgnore

Registers a TestListener.

◆ addWarning()

PHPUnit\Framework\TestResult::addWarning ( Test  $test,
Warning  $e,
float  $time 
)

Adds a warning to the list of warnings. The passed in exception caused the warning.

◆ allCompletelyImplemented()

PHPUnit\Framework\TestResult::allCompletelyImplemented ( )

Returns true if no incomplete test occurred.

◆ allHarmless()

PHPUnit\Framework\TestResult::allHarmless ( )

Returns true if no risky test occurred.

◆ beStrictAboutOutputDuringTests()

PHPUnit\Framework\TestResult::beStrictAboutOutputDuringTests ( bool  $flag)

◆ beStrictAboutResourceUsageDuringSmallTests()

PHPUnit\Framework\TestResult::beStrictAboutResourceUsageDuringSmallTests ( bool  $flag)

◆ beStrictAboutTestsThatDoNotTestAnything()

PHPUnit\Framework\TestResult::beStrictAboutTestsThatDoNotTestAnything ( bool  $flag)

◆ beStrictAboutTodoAnnotatedTests()

PHPUnit\Framework\TestResult::beStrictAboutTodoAnnotatedTests ( bool  $flag)

◆ convertDeprecationsToExceptions()

PHPUnit\Framework\TestResult::convertDeprecationsToExceptions ( bool  $flag)

Enables or disables the deprecation-to-exception conversion.

◆ convertErrorsToExceptions()

PHPUnit\Framework\TestResult::convertErrorsToExceptions ( bool  $flag)

Enables or disables the error-to-exception conversion.

◆ convertNoticesToExceptions()

PHPUnit\Framework\TestResult::convertNoticesToExceptions ( bool  $flag)

Enables or disables the notice-to-exception conversion.

◆ convertWarningsToExceptions()

PHPUnit\Framework\TestResult::convertWarningsToExceptions ( bool  $flag)

Enables or disables the warning-to-exception conversion.

◆ count()

PHPUnit\Framework\TestResult::count ( )

Gets the number of run tests.

◆ endTest()

PHPUnit\Framework\TestResult::endTest ( Test  $test,
float  $time 
)

Informs the result that a test was completed.

Exceptions

◆ endTestSuite()

PHPUnit\Framework\TestResult::endTestSuite ( TestSuite  $suite)

Informs the result that a test suite was completed.

◆ enforcesTimeLimit()

PHPUnit\Framework\TestResult::enforcesTimeLimit ( )

◆ enforceTimeLimit()

PHPUnit\Framework\TestResult::enforceTimeLimit ( bool  $flag)

◆ errorCount()

PHPUnit\Framework\TestResult::errorCount ( )

Gets the number of detected errors.

◆ errors()

PHPUnit\Framework\TestResult::errors ( )

Returns an array of TestFailure objects for the errors

Returns
TestFailure[]

◆ failureCount()

PHPUnit\Framework\TestResult::failureCount ( )

Gets the number of detected failures.

◆ failures()

PHPUnit\Framework\TestResult::failures ( )

Returns an array of TestFailure objects for the failures

Returns
TestFailure[]

◆ flushListeners()

PHPUnit\Framework\TestResult::flushListeners ( )
Deprecated:
Use the TestHook interfaces instead

@codeCoverageIgnore

Flushes all flushable TestListeners.

◆ getCodeCoverage()

PHPUnit\Framework\TestResult::getCodeCoverage ( )

Returns the code coverage object.

◆ getCollectCodeCoverageInformation()

PHPUnit\Framework\TestResult::getCollectCodeCoverageInformation ( )

Returns whether code coverage information should be collected.

◆ getConvertDeprecationsToExceptions()

PHPUnit\Framework\TestResult::getConvertDeprecationsToExceptions ( )

Returns the deprecation-to-exception conversion setting.

◆ getConvertErrorsToExceptions()

PHPUnit\Framework\TestResult::getConvertErrorsToExceptions ( )

Returns the error-to-exception conversion setting.

◆ getConvertNoticesToExceptions()

PHPUnit\Framework\TestResult::getConvertNoticesToExceptions ( )

Returns the notice-to-exception conversion setting.

◆ getConvertWarningsToExceptions()

PHPUnit\Framework\TestResult::getConvertWarningsToExceptions ( )

Returns the warning-to-exception conversion setting.

◆ getTimeoutForLargeTests()

PHPUnit\Framework\TestResult::getTimeoutForLargeTests ( )

Returns the set timeout for large tests.

◆ 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.

◆ notImplemented()

PHPUnit\Framework\TestResult::notImplemented ( )

Returns an array of TestFailure objects for the incomplete tests

Returns
TestFailure[]

◆ notImplementedCount()

PHPUnit\Framework\TestResult::notImplementedCount ( )

Gets the number of incomplete tests.

◆ passed()

PHPUnit\Framework\TestResult::passed ( )

Returns the names of the tests that have passed.

◆ removeListener()

PHPUnit\Framework\TestResult::removeListener ( TestListener  $listener)
Deprecated:
Use the TestHook interfaces instead

@codeCoverageIgnore

Unregisters a TestListener.

◆ risky()

PHPUnit\Framework\TestResult::risky ( )

Returns an array of TestFailure objects for the risky tests

Returns
TestFailure[]

◆ riskyCount()

PHPUnit\Framework\TestResult::riskyCount ( )

Gets the number of risky tests.

◆ run()

PHPUnit\Framework\TestResult::run ( Test  $test)

Runs a TestCase.

Exceptions
CodeCoverageException
OriginalCoveredCodeNotExecutedException
OriginalMissingCoversAnnotationException
UnintentionallyCoveredCodeException

@noinspection ForgottenDebugOutputInspection

◆ setCodeCoverage()

PHPUnit\Framework\TestResult::setCodeCoverage ( CodeCoverage  $codeCoverage)

Sets the code coverage object.

◆ setDefaultTimeLimit()

PHPUnit\Framework\TestResult::setDefaultTimeLimit ( int  $timeout)

Sets the default timeout for tests

◆ setRegisterMockObjectsFromTestArgumentsRecursively()

PHPUnit\Framework\TestResult::setRegisterMockObjectsFromTestArgumentsRecursively ( bool  $flag)

◆ setTimeoutForLargeTests()

PHPUnit\Framework\TestResult::setTimeoutForLargeTests ( int  $timeout)

Sets the timeout for large tests.

◆ setTimeoutForMediumTests()

PHPUnit\Framework\TestResult::setTimeoutForMediumTests ( int  $timeout)

Sets the timeout for medium tests.

◆ setTimeoutForSmallTests()

PHPUnit\Framework\TestResult::setTimeoutForSmallTests ( int  $timeout)

Sets the timeout for small tests.

◆ shouldStop()

PHPUnit\Framework\TestResult::shouldStop ( )

Checks whether the test run should stop.

◆ skipped()

PHPUnit\Framework\TestResult::skipped ( )

Returns an array of TestFailure objects for the skipped tests

Returns
TestFailure[]

◆ skippedCount()

PHPUnit\Framework\TestResult::skippedCount ( )

Gets the number of skipped tests.

◆ startTest()

PHPUnit\Framework\TestResult::startTest ( Test  $test)

Informs the result that a test will be started.

◆ startTestSuite()

PHPUnit\Framework\TestResult::startTestSuite ( TestSuite  $suite)

Informs the result that a test suite will be started.

◆ stop()

PHPUnit\Framework\TestResult::stop ( )

Marks that the test run should stop.

◆ stopOnDefect()

PHPUnit\Framework\TestResult::stopOnDefect ( bool  $flag)

Enables or disables the stopping for defects: error, failure, warning

◆ stopOnError()

PHPUnit\Framework\TestResult::stopOnError ( bool  $flag)

Enables or disables the stopping when an error occurs.

◆ stopOnFailure()

PHPUnit\Framework\TestResult::stopOnFailure ( bool  $flag)

Enables or disables the stopping when a failure occurs.

◆ stopOnIncomplete()

PHPUnit\Framework\TestResult::stopOnIncomplete ( bool  $flag)

Enables or disables the stopping for incomplete tests.

◆ stopOnRisky()

PHPUnit\Framework\TestResult::stopOnRisky ( bool  $flag)

Enables or disables the stopping for risky tests.

◆ stopOnSkipped()

PHPUnit\Framework\TestResult::stopOnSkipped ( bool  $flag)

Enables or disables the stopping for skipped tests.

◆ stopOnWarning()

PHPUnit\Framework\TestResult::stopOnWarning ( bool  $flag)

Enables or disables the stopping when a warning occurs.

◆ time()

PHPUnit\Framework\TestResult::time ( )

Returns the time spent running the tests.

◆ topTestSuite()

PHPUnit\Framework\TestResult::topTestSuite ( )

Returns the (top) test suite.

◆ warningCount()

PHPUnit\Framework\TestResult::warningCount ( )

Gets the number of detected warnings.

◆ warnings()

PHPUnit\Framework\TestResult::warnings ( )

Returns an array of TestFailure objects for the warnings

Returns
TestFailure[]

◆ wasSuccessful()

PHPUnit\Framework\TestResult::wasSuccessful ( )

Returns whether the entire test was successful or not.

◆ wasSuccessfulAndNoTestIsRiskyOrSkippedOrIncomplete()

PHPUnit\Framework\TestResult::wasSuccessfulAndNoTestIsRiskyOrSkippedOrIncomplete ( )

◆ wasSuccessfulIgnoringWarnings()

PHPUnit\Framework\TestResult::wasSuccessfulIgnoringWarnings ( )

The documentation for this class was generated from the following file: