1 | <?php |
||
17 | class ProcessPrinter implements EventSubscriberInterface |
||
18 | { |
||
19 | const MAX_CHAR_LENGTH = 80; |
||
20 | const COUNTER_CHAR_LENGTH = 5; |
||
21 | |||
22 | /** @var SingleResultFormatter */ |
||
23 | private $singleResultFormatter; |
||
24 | |||
25 | /** @var OutputInterface */ |
||
26 | private $output; |
||
27 | |||
28 | /** @var int */ |
||
29 | private $counter; |
||
30 | |||
31 | /** @var int */ |
||
32 | private $singleRowCounter; |
||
33 | |||
34 | /** |
||
35 | * ProcessPrinter constructor. |
||
36 | * @param SingleResultFormatter $singleResultFormatter |
||
37 | * @param OutputInterface $output |
||
38 | */ |
||
39 | 49 | public function __construct(SingleResultFormatter $singleResultFormatter, OutputInterface $output) |
|
46 | |||
47 | 70 | public static function getSubscribedEvents(): array |
|
55 | |||
56 | /** |
||
57 | * @param ProcessEvent $processEvent |
||
58 | * @throws \BadMethodCallException |
||
59 | */ |
||
60 | 43 | public function onProcessCompleted(ProcessEvent $processEvent) |
|
68 | |||
69 | 26 | public function onEngineEnd() |
|
78 | |||
79 | /** |
||
80 | * @param PrintableTestResultInterface $testResult |
||
81 | */ |
||
82 | 43 | private function printFormattedWithCounter(PrintableTestResultInterface $testResult) |
|
95 | |||
96 | 32 | private function printCounter() |
|
101 | |||
102 | 47 | private function isRowFull(): bool |
|
106 | } |
||
107 |