|
3 | 3 |
|
4 | 4 | namespace JohnKary\PHPUnit\Listener;
|
5 | 5 |
|
6 |
| -use PHPUnit\Framework\{AssertionFailedError, TestSuite, Test, TestCase, TestListener, Warning}; |
| 6 | +use PHPUnit\Framework\{AssertionFailedError, TestSuite, Test, TestCase, BaseTestListener, Warning}; |
7 | 7 |
|
8 | 8 | /**
|
9 | 9 | * A PHPUnit TestListener that exposes your slowest running tests by outputting
|
10 | 10 | * results directly to the console.
|
11 | 11 | */
|
12 |
| -class SpeedTrapListener implements TestListener |
| 12 | +class SpeedTrapListener extends BaseTestListener |
13 | 13 | {
|
14 | 14 | /**
|
15 | 15 | * Internal tracking for test suites.
|
@@ -46,81 +46,6 @@ public function __construct(array $options = [])
|
46 | 46 | $this->loadOptions($options);
|
47 | 47 | }
|
48 | 48 |
|
49 |
| - /** |
50 |
| - * An error occurred. |
51 |
| - * |
52 |
| - * @param Test $test |
53 |
| - * @param \Exception $e |
54 |
| - * @param float $time |
55 |
| - */ |
56 |
| - public function addError(Test $test, \Exception $e, $time) |
57 |
| - { |
58 |
| - } |
59 |
| - |
60 |
| - /** |
61 |
| - * A warning occurred. |
62 |
| - * |
63 |
| - * @param Test $test |
64 |
| - * @param Warning $e |
65 |
| - * @param float $time |
66 |
| - */ |
67 |
| - public function addWarning(Test $test, Warning $e, $time) |
68 |
| - { |
69 |
| - } |
70 |
| - |
71 |
| - /** |
72 |
| - * A failure occurred. |
73 |
| - * |
74 |
| - * @param Test $test |
75 |
| - * @param AssertionFailedError $e |
76 |
| - * @param float $time |
77 |
| - */ |
78 |
| - public function addFailure(Test $test, AssertionFailedError $e, $time) |
79 |
| - { |
80 |
| - } |
81 |
| - |
82 |
| - /** |
83 |
| - * Incomplete test. |
84 |
| - * |
85 |
| - * @param Test $test |
86 |
| - * @param \Exception $e |
87 |
| - * @param float $time |
88 |
| - */ |
89 |
| - public function addIncompleteTest(Test $test, \Exception $e, $time) |
90 |
| - { |
91 |
| - } |
92 |
| - |
93 |
| - /** |
94 |
| - * Risky test. |
95 |
| - * |
96 |
| - * @param Test $test |
97 |
| - * @param \Exception $e |
98 |
| - * @param float $time |
99 |
| - */ |
100 |
| - public function addRiskyTest(Test $test, \Exception $e, $time) |
101 |
| - { |
102 |
| - } |
103 |
| - |
104 |
| - /** |
105 |
| - * Skipped test. |
106 |
| - * |
107 |
| - * @param Test $test |
108 |
| - * @param \Exception $e |
109 |
| - * @param float $time |
110 |
| - */ |
111 |
| - public function addSkippedTest(Test $test, \Exception $e, $time) |
112 |
| - { |
113 |
| - } |
114 |
| - |
115 |
| - /** |
116 |
| - * A test started. |
117 |
| - * |
118 |
| - * @param Test $test |
119 |
| - */ |
120 |
| - public function startTest(Test $test) |
121 |
| - { |
122 |
| - } |
123 |
| - |
124 | 49 | /**
|
125 | 50 | * A test ended.
|
126 | 51 | *
|
|
0 commit comments