1 | <?php |
||
16 | class ExecutionTimeTestListener implements PHPUnit_Framework_TestListener { |
||
17 | |||
18 | protected $testCollector = array(); |
||
19 | protected $executionTimeThresholdInSeconds = 10; |
||
20 | protected $isEnabledToListen = true; |
||
21 | |||
22 | public function __construct( $isEnabledToListen, $executionTimeThresholdInSeconds ) { |
||
26 | |||
27 | /** |
||
28 | * @see PHPUnit_Framework_TestListener::startTest |
||
29 | */ |
||
30 | public function startTest( PHPUnit_Framework_Test $test ) { |
||
32 | |||
33 | /** |
||
34 | * @see PHPUnit_Framework_TestListener::endTest |
||
35 | */ |
||
36 | public function endTest( PHPUnit_Framework_Test $test, $length ) { |
||
41 | |||
42 | /** |
||
43 | * @see PHPUnit_Framework_TestListener::addError |
||
44 | */ |
||
45 | public function addError( PHPUnit_Framework_Test $test, Exception $e, $time ) { |
||
47 | |||
48 | /** |
||
49 | * @see PHPUnit_Framework_TestListener::addFailure |
||
50 | */ |
||
51 | public function addFailure( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time ) { |
||
53 | |||
54 | /** |
||
55 | * @see PHPUnit_Framework_TestListener::addError |
||
56 | */ |
||
57 | public function addIncompleteTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { |
||
59 | |||
60 | /** |
||
61 | * @see PHPUnit_Framework_TestListener::addRiskyTest |
||
62 | * @since 4.0.0 |
||
63 | */ |
||
64 | public function addRiskyTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { |
||
66 | |||
67 | /** |
||
68 | * @see PHPUnit_Framework_TestListener::addSkippedTest |
||
69 | */ |
||
70 | public function addSkippedTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { |
||
72 | |||
73 | /** |
||
74 | * @see PHPUnit_Framework_TestListener::startTestSuite |
||
75 | */ |
||
76 | public function startTestSuite( PHPUnit_Framework_TestSuite $suite ) { |
||
78 | |||
79 | /** |
||
80 | * @see PHPUnit_Framework_TestListener::endTestSuite |
||
81 | */ |
||
82 | public function endTestSuite( PHPUnit_Framework_TestSuite $suite ) { |
||
88 | |||
89 | } |
||
90 |