[ Index ] |
PHP Cross Reference of BBPress |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 326 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
SpeedTrapListener:: (23 methods):
__construct()
addError()
addWarning()
addFailure()
addIncompleteTest()
addRiskyTest()
addSkippedTest()
startTest()
endTest()
startTestSuite()
endTestSuite()
isSlow()
addSlowTest()
hasSlowTests()
toMilliseconds()
makeLabel()
getReportLength()
getHiddenCount()
renderHeader()
renderBody()
renderFooter()
loadOptions()
getSlowThreshold()
Class: SpeedTrapListener - X-Ref
A PHPUnit TestListener that exposes your slowest running tests by outputting__construct(array $options = array() X-Ref |
Construct a new instance. param: array $options |
addError(PHPUnit_Framework_Test $test, Exception $e, $time) X-Ref |
An error occurred. param: PHPUnit_Framework_Test $test param: Exception $e param: float $time |
addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) X-Ref |
A warning occurred. since: Method available since Release 5.1.0 param: PHPUnit_Framework_Test $test param: PHPUnit_Framework_Warning $e param: float $time |
addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) X-Ref |
A failure occurred. param: PHPUnit_Framework_Test $test param: PHPUnit_Framework_AssertionFailedError $e param: float $time |
addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) X-Ref |
Incomplete test. param: PHPUnit_Framework_Test $test param: Exception $e param: float $time |
addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) X-Ref |
Risky test. since: Method available since Release 4.0.0 param: PHPUnit_Framework_Test $test param: Exception $e param: float $time |
addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) X-Ref |
Skipped test. param: PHPUnit_Framework_Test $test param: Exception $e param: float $time |
startTest(PHPUnit_Framework_Test $test) X-Ref |
A test started. param: PHPUnit_Framework_Test $test |
endTest(PHPUnit_Framework_Test $test, $time) X-Ref |
A test ended. param: PHPUnit_Framework_Test $test param: float $time |
startTestSuite(PHPUnit_Framework_TestSuite $suite) X-Ref |
A test suite started. param: PHPUnit_Framework_TestSuite $suite |
endTestSuite(PHPUnit_Framework_TestSuite $suite) X-Ref |
A test suite ended. param: PHPUnit_Framework_TestSuite $suite |
isSlow($time, $slowThreshold) X-Ref |
Whether the given test execution time is considered slow. return: bool param: int $time Test execution time in milliseconds param: int $slowThreshold Test execution time at which a test should be considered slow (milliseconds) |
addSlowTest(PHPUnit_Framework_TestCase $test, $time) X-Ref |
Stores a test as slow. param: PHPUnit_Framework_TestCase $test param: int $time Test execution time in milliseconds |
hasSlowTests() X-Ref |
Whether at least one test has been considered slow. return: bool |
toMilliseconds($time) X-Ref |
Convert PHPUnit's reported test time (microseconds) to milliseconds. return: int param: float $time |
makeLabel(PHPUnit_Framework_TestCase $test) X-Ref |
Label for describing a test. return: string param: PHPUnit_Framework_TestCase $test |
getReportLength() X-Ref |
Calculate number of slow tests to report about. return: int |
getHiddenCount() X-Ref |
Find how many slow tests occurred that won't be shown due to list length. return: int Number of hidden slow tests |
renderHeader() X-Ref |
Renders slow test report header. |
renderBody() X-Ref |
Renders slow test report body. |
renderFooter() X-Ref |
Renders slow test report footer. |
loadOptions(array $options) X-Ref |
Populate options into class internals. param: array $options |
getSlowThreshold(PHPUnit_Framework_TestCase $test) X-Ref |
Get slow test threshold for given test. A TestCase can override the suite-wide slow threshold by using the annotation @slowThreshold with the threshold value in milliseconds. The following test will only be considered slow when its execution time reaches 5000ms (5 seconds): <code> return: int param: PHPUnit_Framework_TestCase $test |
Generated: Sat Dec 21 01:00:52 2024 | Cross-referenced by PHPXref 0.7.1 |