1 | <?php |
||
11 | class JSONLogStub |
||
12 | { |
||
13 | const TWO_ERRORS_TWO_FAILURES = '2Errors2Failures'; |
||
14 | const ALL_GREEN = 'AllGreen'; |
||
15 | const FATAL_ERROR = 'FatalError'; |
||
16 | const SEGFAULT = 'SegFault'; |
||
17 | const ONE_ERROR = 'SingleError'; |
||
18 | const ONE_INCOMPLETE = 'SingleIncomplete'; |
||
19 | const ONE_RISKY = 'SingleRisky'; |
||
20 | const ONE_SKIP = 'SingleSkip'; |
||
21 | const ONE_WARNING = 'SingleWarning'; |
||
22 | const UNKNOWN = 'Unknown'; |
||
23 | const PARSE_ERROR = 'ParseError'; |
||
24 | |||
25 | /** |
||
26 | * @param string $filename |
||
27 | * @return string |
||
28 | * @throws \Exception |
||
29 | */ |
||
30 | public static function getLogs(string $filename): string |
||
34 | |||
35 | /** |
||
36 | * @param string $filename |
||
37 | * @return string |
||
38 | * @throws \Exception |
||
39 | */ |
||
40 | public static function getCleanOutputFileContent(string $filename): string |
||
51 | |||
52 | /** |
||
53 | * @param string $jsonString The dirty output |
||
54 | * @return string The normalized log, as an array of JSON objects |
||
55 | */ |
||
56 | private static function cleanLog($jsonString) |
||
62 | } |
||
63 |