1 | <?php |
||
18 | class ExecutionTimeTestListener implements PHPUnit_Framework_TestListener { |
||
19 | |||
20 | protected $testCollector = array(); |
||
21 | protected $executionTimeThresholdInSeconds = 10; |
||
22 | protected $isEnabledToListen = true; |
||
23 | |||
24 | public function __construct( $isEnabledToListen, $executionTimeThresholdInSeconds ) { |
||
28 | |||
29 | /** |
||
30 | * @see PHPUnit_Framework_TestListener::startTest |
||
31 | */ |
||
32 | public function startTest( PHPUnit_Framework_Test $test ) { |
||
34 | |||
35 | /** |
||
36 | * @see PHPUnit_Framework_TestListener::endTest |
||
37 | */ |
||
38 | public function endTest( PHPUnit_Framework_Test $test, $length ) { |
||
43 | |||
44 | /** |
||
45 | * @see PHPUnit_Framework_TestListener::addError |
||
46 | */ |
||
47 | public function addError( PHPUnit_Framework_Test $test, Exception $e, $time ) { |
||
49 | |||
50 | /** |
||
51 | * @see PHPUnit_Framework_TestListener::addFailure |
||
52 | */ |
||
53 | public function addFailure( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time ) { |
||
55 | |||
56 | /** |
||
57 | * @see PHPUnit_Framework_TestListener::addError |
||
58 | */ |
||
59 | public function addIncompleteTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { |
||
61 | |||
62 | /** |
||
63 | * @see PHPUnit_Framework_TestListener::addRiskyTest |
||
64 | * @since 4.0.0 |
||
65 | */ |
||
66 | public function addRiskyTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { |
||
68 | |||
69 | /** |
||
70 | * @see PHPUnit_Framework_TestListener::addSkippedTest |
||
71 | */ |
||
72 | public function addSkippedTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { |
||
74 | |||
75 | /** |
||
76 | * @see PHPUnit_Framework_TestListener::startTestSuite |
||
77 | */ |
||
78 | public function startTestSuite( PHPUnit_Framework_TestSuite $suite ) { |
||
80 | |||
81 | /** |
||
82 | * @see PHPUnit_Framework_TestListener::endTestSuite |
||
83 | */ |
||
84 | public function endTestSuite( PHPUnit_Framework_TestSuite $suite ) { |
||
90 | |||
91 | } |
||
92 |