• internal This class is not covered by the backward compatibility promise for PHPUnit
CloneableFinalInstantiable
ImplementsCountable
Methods
public addError(PHPUnit\Framework\Test $test, Throwable $t, float $time) : void
 

Adds an error to the list of errors.

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

Adds a failure to the list of failures.

The passed in exception caused the failure.

public addListener(PHPUnit\Framework\TestListener $listener) : void
 
  • deprecated Use the `TestHook` interfaces instead
  • codeCoverageIgnore Registers a TestListener.
public addWarning(PHPUnit\Framework\Test $test, PHPUnit\Framework\Warning $e, float $time) : void
 

Adds a warning to the list of warnings.

The passed in exception caused the warning.

public allCompletelyImplemented() : bool
 

Returns true if no incomplete test occurred.

public allHarmless() : bool
 

Returns true if no risky test occurred.

public beStrictAboutOutputDuringTests(bool $flag) : void
public beStrictAboutResourceUsageDuringSmallTests(bool $flag) : void
public beStrictAboutTestsThatDoNotTestAnything(bool $flag) : void
public beStrictAboutTodoAnnotatedTests(bool $flag) : void
public convertDeprecationsToExceptions(bool $flag) : void
 

Enables or disables the deprecation-to-exception conversion.

public convertErrorsToExceptions(bool $flag) : void
 

Enables or disables the error-to-exception conversion.

public convertNoticesToExceptions(bool $flag) : void
 

Enables or disables the notice-to-exception conversion.

public convertWarningsToExceptions(bool $flag) : void
 

Enables or disables the warning-to-exception conversion.

public count() : int
 

Gets the number of run tests.

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

Informs the result that a test was completed.

  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
public endTestSuite(PHPUnit\Framework\TestSuite $suite) : void
 

Informs the result that a test suite was completed.

public enforcesTimeLimit() : bool
public enforceTimeLimit(bool $flag) : void
public errorCount() : int
 

Gets the number of detected errors.

public errors() : array
 

Returns an array of TestFailure objects for the errors

  • return TestFailure[]
public failureCount() : int
 

Gets the number of detected failures.

public failures() : array
 

Returns an array of TestFailure objects for the failures

  • return TestFailure[]
public flushListeners() : void
 
  • deprecated Use the `TestHook` interfaces instead
  • codeCoverageIgnore Flushes all flushable TestListeners.
public getCodeCoverage() : SebastianBergmann\CodeCoverage\CodeCoverage
 

Returns the code coverage object.

public getCollectCodeCoverageInformation() : bool
 

Returns whether code coverage information should be collected.

public getConvertDeprecationsToExceptions() : bool
 

Returns the deprecation-to-exception conversion setting.

public getConvertErrorsToExceptions() : bool
 

Returns the error-to-exception conversion setting.

public getConvertNoticesToExceptions() : bool
 

Returns the notice-to-exception conversion setting.

public getConvertWarningsToExceptions() : bool
 

Returns the warning-to-exception conversion setting.

public getTimeoutForLargeTests() : int
 

Returns the set timeout for large tests.

public isStrictAboutOutputDuringTests() : bool
public isStrictAboutResourceUsageDuringSmallTests() : bool
public isStrictAboutTestsThatDoNotTestAnything() : bool
public isStrictAboutTodoAnnotatedTests() : bool
public noneSkipped() : bool
 

Returns true if no test has been skipped.

public notImplemented() : array
 

Returns an array of TestFailure objects for the incomplete tests

  • return TestFailure[]
public notImplementedCount() : int
 

Gets the number of incomplete tests.

public passed() : array
 

Returns the names of the tests that have passed.

public removeListener(PHPUnit\Framework\TestListener $listener) : void
 
  • deprecated Use the `TestHook` interfaces instead
  • codeCoverageIgnore Unregisters a TestListener.
public risky() : array
 

Returns an array of TestFailure objects for the risky tests

  • return TestFailure[]
public riskyCount() : int
 

Gets the number of risky tests.

public run(PHPUnit\Framework\Test $test) : void
 

Runs a TestCase.

  • throws CodeCoverageException
  • throws OriginalCoveredCodeNotExecutedException
  • throws OriginalMissingCoversAnnotationException
  • throws UnintentionallyCoveredCodeException
  • throws SebastianBergmann\CodeCoverage\InvalidArgumentException
  • throws SebastianBergmann\CodeCoverage\RuntimeException
  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
public setCodeCoverage(SebastianBergmann\CodeCoverage\CodeCoverage $codeCoverage) : void
 

Sets the code coverage object.

public setDefaultTimeLimit(int $timeout) : void
 

Sets the default timeout for tests

public setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag) : void
public setTimeoutForLargeTests(int $timeout) : void
 

Sets the timeout for large tests.

public setTimeoutForMediumTests(int $timeout) : void
 

Sets the timeout for medium tests.

public setTimeoutForSmallTests(int $timeout) : void
 

Sets the timeout for small tests.

public shouldStop() : bool
 

Checks whether the test run should stop.

public skipped() : array
 

Returns an array of TestFailure objects for the skipped tests

  • return TestFailure[]
public skippedCount() : int
 

Gets the number of skipped tests.

public startTest(PHPUnit\Framework\Test $test) : void
 

Informs the result that a test will be started.

public startTestSuite(PHPUnit\Framework\TestSuite $suite) : void
 

Informs the result that a test suite will be started.

public stop() : void
 

Marks that the test run should stop.

public stopOnDefect(bool $flag) : void
 

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

public stopOnError(bool $flag) : void
 

Enables or disables the stopping when an error occurs.

public stopOnFailure(bool $flag) : void
 

Enables or disables the stopping when a failure occurs.

public stopOnIncomplete(bool $flag) : void
 

Enables or disables the stopping for incomplete tests.

public stopOnRisky(bool $flag) : void
 

Enables or disables the stopping for risky tests.

public stopOnSkipped(bool $flag) : void
 

Enables or disables the stopping for skipped tests.

public stopOnWarning(bool $flag) : void
 

Enables or disables the stopping when a warning occurs.

public time() : float
 

Returns the time spent running the tests.

public topTestSuite() : PHPUnit\Framework\TestSuite
 

Returns the (top) test suite.

public warningCount() : int
 

Gets the number of detected warnings.

public warnings() : array
 

Returns an array of TestFailure objects for the warnings

  • return TestFailure[]
public wasSuccessful() : bool
 

Returns whether the entire test was successful or not.

public wasSuccessfulIgnoringWarnings() : bool
Properties
private $beStrictAboutOutputDuringTests
 
  • var bool
private $beStrictAboutResourceUsageDuringSmallTests
 
  • var bool
private $beStrictAboutTestsThatDoNotTestAnything
 
  • var bool
private $beStrictAboutTodoAnnotatedTests
 
  • var bool
private $codeCoverage
 

Code Coverage information.

  • var CodeCoverage
private $convertDeprecationsToExceptions
 
  • var bool
private $convertErrorsToExceptions
 
  • var bool
private $convertNoticesToExceptions
 
  • var bool
private $convertWarningsToExceptions
 
  • var bool
private $defaultTimeLimit
 
  • var int
private $enforceTimeLimit
 
  • var bool
private $errors
 
  • var TestFailure[]
private $failures
 
  • var TestFailure[]
private $lastTestFailed
 
  • var bool
private $listeners
 
  • deprecated Use the `TestHook` interfaces instead
  • var TestListener[]
private $notImplemented
 
  • var TestFailure[]
private $passed
 
  • var array
private $registerMockObjectsFromTestArgumentsRecursively
 
  • var bool
private $risky
 
  • var TestFailure[]
private $runTests
 
  • var int
private $skipped
 
  • var TestFailure[]
private $stop
 
  • var bool
private $stopOnDefect
 
  • var bool
private $stopOnError
 
  • var bool
private $stopOnFailure
 
  • var bool
private $stopOnIncomplete
 
  • var bool
private $stopOnRisky
 
  • var bool
private $stopOnSkipped
 
  • var bool
private $stopOnWarning
 
  • var bool
private $time
 
  • var float
private $timeoutForLargeTests
 
  • var int
private $timeoutForMediumTests
 
  • var int
private $timeoutForSmallTests
 
  • var int
private $topTestSuite
private $warnings
 
  • var TestFailure[]
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only