A PHPUnit TestListener that exposes your slowest running tests by outputting results directly to the console.
| package | bbPress |
|---|
__construct(array $options = array())
array
addError(\PHPUnit_Framework_Test $test, \Exception $e, float $time)
\PHPUnit_Framework_Test
\Exception
float
addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, float $time)
\PHPUnit_Framework_Test
\PHPUnit_Framework_AssertionFailedError
float
addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, float $time)
\PHPUnit_Framework_Test
\Exception
float
addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, float $time)
| since | Method available since Release 4.0.0 |
|---|
\PHPUnit_Framework_Test
\Exception
float
addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, float $time)
\PHPUnit_Framework_Test
\Exception
float
addWarning(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Warning $e, float $time)
| since | Method available since Release 5.1.0 |
|---|
\PHPUnit_Framework_Test
\PHPUnit_Framework_Warning
float
endTest(\PHPUnit_Framework_Test $test, float $time)
\PHPUnit_Framework_Test
float
endTestSuite(\PHPUnit_Framework_TestSuite $suite)
\PHPUnit_Framework_TestSuite
startTest(\PHPUnit_Framework_Test $test)
\PHPUnit_Framework_Test
startTestSuite(\PHPUnit_Framework_TestSuite $suite)
\PHPUnit_Framework_TestSuite
addSlowTest(\PHPUnit_Framework_TestCase $test, integer $time)
\PHPUnit_Framework_TestCase
integerTest execution time in milliseconds
getHiddenCount() : integer
integerNumber of hidden slow testsgetReportLength() : integer
integergetSlowThreshold(\PHPUnit_Framework_TestCase $test) : integer
The following test will only be considered slow when its execution time reaches 5000ms (5 seconds):
| slowThreshold | 5000 public function testLongRunningProcess() {} |
|---|
\PHPUnit_Framework_TestCase
integerhasSlowTests() : boolean
booleanisSlow(integer $time, integer $slowThreshold) : boolean
integerTest execution time in milliseconds
integerTest execution time at which a test should be considered slow (milliseconds)
booleanloadOptions(array $options)
array
makeLabel(\PHPUnit_Framework_TestCase $test) : string
\PHPUnit_Framework_TestCase
stringrenderBody()
renderHeader()
toMilliseconds(float $time) : integer
float
integer$reportLength : integer
$slow : array
array()$slowThreshold : integer
$suites : integer
0Increments as more suites are run, then decremented as they finish. All suites have been run when returns to 0.