1 | <?php |
||
16 | class ProcessPrinter implements EventSubscriberInterface |
||
17 | { |
||
18 | const MAX_CHAR_LENGTH = 80; |
||
19 | const COUNTER_CHAR_LENGTH = 5; |
||
20 | |||
21 | /** @var SingleResultFormatter */ |
||
22 | private $singleResultFormatter; |
||
23 | |||
24 | /** @var OutputInterface */ |
||
25 | private $output; |
||
26 | |||
27 | /** @var int */ |
||
28 | private $counter; |
||
29 | |||
30 | /** @var int */ |
||
31 | private $singleRowCounter; |
||
32 | |||
33 | /** |
||
34 | * ProcessPrinter constructor. |
||
35 | * @param SingleResultFormatter $singleResultFormatter |
||
36 | * @param OutputInterface $output |
||
37 | */ |
||
38 | 40 | public function __construct(SingleResultFormatter $singleResultFormatter, OutputInterface $output) |
|
45 | |||
46 | 58 | public static function getSubscribedEvents(): array |
|
53 | |||
54 | /** |
||
55 | * @param ProcessEvent $processEvent |
||
56 | * @throws \BadMethodCallException |
||
57 | */ |
||
58 | 36 | public function onProcessParsingCompleted(ProcessEvent $processEvent) |
|
66 | |||
67 | 19 | public function onEngineEnd() |
|
76 | |||
77 | /** |
||
78 | * @param PrintableTestResultInterface $testResult |
||
79 | */ |
||
80 | 36 | private function printFormattedWithCounter(PrintableTestResultInterface $testResult) |
|
93 | |||
94 | 25 | private function printCounter() |
|
99 | |||
100 | 40 | private function isRowFull(): bool |
|
104 | } |
||
105 |