1 | <?php |
||
18 | class LogParser implements EventSubscriberInterface |
||
19 | { |
||
20 | /** @var LogFetcher */ |
||
21 | private $logLocator; |
||
22 | |||
23 | /** @var TestResultHandlerInterface */ |
||
24 | private $noTestExecutedResultContainer; |
||
25 | |||
26 | /** @var EventDispatcherInterface */ |
||
27 | private $eventDispatcher; |
||
28 | |||
29 | /** @var RetryParser */ |
||
30 | private $retryParser; |
||
31 | |||
32 | /** @var ParserChainElementInterface[] */ |
||
33 | private $parsers; |
||
34 | |||
35 | /** |
||
36 | * LogParser constructor. |
||
37 | * @param LogFetcher $logLocator |
||
38 | * @param TestResultHandlerInterface $noTestExecutedResultContainer |
||
39 | * @param EventDispatcherInterface $eventDispatcher |
||
40 | * @param RetryParser $retryParser |
||
41 | */ |
||
42 | 39 | public function __construct( |
|
54 | |||
55 | 64 | public static function getSubscribedEvents(): array |
|
61 | |||
62 | /** |
||
63 | * @param ParserChainElementInterface $container |
||
64 | */ |
||
65 | 39 | public function addParser(ParserChainElementInterface $container) |
|
69 | |||
70 | /** |
||
71 | * @return ParserChainElementInterface[] |
||
72 | */ |
||
73 | public function getParsers(): array |
||
77 | |||
78 | /** |
||
79 | * @param ProcessEvent $processEvent |
||
80 | */ |
||
81 | 37 | public function onProcessTerminated(ProcessEvent $processEvent) |
|
104 | |||
105 | /** |
||
106 | * @param AbstractParaunitProcess $process |
||
107 | * @param \stdClass $logItem |
||
108 | */ |
||
109 | 32 | private function processLog(AbstractParaunitProcess $process, \stdClass $logItem) |
|
118 | |||
119 | /** |
||
120 | * @param AbstractParaunitProcess $process |
||
121 | * @param array $logs |
||
122 | * @return bool |
||
123 | */ |
||
124 | 37 | private function noTestsExecuted(AbstractParaunitProcess $process, array $logs): bool |
|
128 | } |
||
129 |