1 | <?php |
||
39 | final class Listener extends Printer implements TestListener |
||
|
|||
40 | { |
||
41 | /** |
||
42 | * Holds an instance of the console input. |
||
43 | * |
||
44 | * @var InputInterface |
||
45 | */ |
||
46 | private $input; |
||
47 | |||
48 | /** |
||
49 | * Holds an instance of the console input. |
||
50 | * |
||
51 | * @var ConsoleOutput |
||
52 | */ |
||
53 | private $output; |
||
54 | |||
55 | /** |
||
56 | * Holds an instance of Section. |
||
57 | * |
||
58 | * @var Section |
||
59 | */ |
||
60 | private $section; |
||
61 | |||
62 | /** |
||
63 | * The timer. |
||
64 | * |
||
65 | * @var Timer |
||
66 | */ |
||
67 | private $timer; |
||
68 | |||
69 | /** |
||
70 | * The number of total tests. |
||
71 | * |
||
72 | * @var int|null |
||
73 | */ |
||
74 | private $totalTests; |
||
75 | |||
76 | /** |
||
77 | * Indicates that the method `end` |
||
78 | * was called already. |
||
79 | * |
||
80 | * @var bool |
||
81 | */ |
||
82 | private $sectionEnded = false; |
||
83 | |||
84 | /** |
||
85 | * The current test number. |
||
86 | * |
||
87 | * @var int |
||
88 | */ |
||
89 | private $currentTestNumber = 0; |
||
90 | |||
91 | /** |
||
92 | * The number of passed tests. |
||
93 | * |
||
94 | * @var int |
||
95 | */ |
||
96 | private $passedTests = 0; |
||
97 | |||
98 | /** |
||
99 | * The number of skipped tests. |
||
100 | * |
||
101 | * @var int |
||
102 | */ |
||
103 | private $skippedTests = 0; |
||
104 | |||
105 | /** |
||
106 | * The number of warning tests. |
||
107 | * |
||
108 | * @var int |
||
109 | */ |
||
110 | private $warningsTests = 0; |
||
111 | |||
112 | /** |
||
113 | * The number of incomplete tests. |
||
114 | * |
||
115 | * @var int |
||
116 | */ |
||
117 | private $incompleteTests = 0; |
||
118 | |||
119 | /** |
||
120 | * The number of risky tests. |
||
121 | * |
||
122 | * @var int |
||
123 | */ |
||
124 | private $riskyTests = 0; |
||
125 | |||
126 | /** |
||
127 | * Creates a new instance of the listener. |
||
128 | * |
||
129 | * @param InputInterface $input |
||
130 | * @param ConsoleOutput $output |
||
131 | * |
||
132 | * @throws \ReflectionException |
||
133 | */ |
||
134 | 3 | public function __construct(InputInterface $input = null, ConsoleOutput $output = null) |
|
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | public function addError(Test $test, \Throwable $throwable, float $time): void |
||
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | */ |
||
162 | public function addWarning(Test $test, Warning $warning, float $time): void |
||
168 | |||
169 | /** |
||
170 | * {@inheritdoc} |
||
171 | */ |
||
172 | public function addFailure(Test $test, AssertionFailedError $error, float $time): void |
||
187 | |||
188 | /** |
||
189 | * {@inheritdoc} |
||
190 | */ |
||
191 | public function addIncompleteTest(Test $test, \Throwable $t, float $time): void |
||
196 | |||
197 | /** |
||
198 | * {@inheritdoc} |
||
199 | */ |
||
200 | public function addRiskyTest(Test $test, \Throwable $t, float $time): void |
||
205 | |||
206 | /** |
||
207 | * {@inheritdoc} |
||
208 | */ |
||
209 | public function addSkippedTest(Test $test, Throwable $t, float $time): void |
||
214 | |||
215 | /** |
||
216 | * {@inheritdoc} |
||
217 | */ |
||
218 | public function startTestSuite(TestSuite $suite): void |
||
224 | |||
225 | /** |
||
226 | * {@inheritdoc} |
||
227 | */ |
||
228 | public function endTestSuite(TestSuite $suite): void |
||
266 | |||
267 | /** |
||
268 | * {@inheritdoc} |
||
269 | */ |
||
270 | 1 | public function startTest(Test $test): void |
|
280 | |||
281 | /** |
||
282 | * {@inheritdoc} |
||
283 | */ |
||
284 | public function endTest(Test $test, float $time): void |
||
291 | |||
292 | /** |
||
293 | * Intencionally left blank as we |
||
294 | * output things on events of the |
||
295 | * listener. |
||
296 | * |
||
297 | * @param string $content |
||
298 | * |
||
299 | * @return void |
||
300 | */ |
||
301 | public function write(string $content): void |
||
305 | } |
||
306 | } |
||
307 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.