| 1 | <?php |
||
| 7 | class TestResultsParser implements JSONParserChainElementInterface |
||
| 8 | { |
||
| 9 | const PHPUNIT_TEST_RESULTS_REGEX = '/(?<=by Sebastian Bergmann and contributors.\n\n)(.*?)+(?=\n\nTime:)/s'; |
||
| 10 | const PHPUNIT_CONFIG_LOAD = 'Configuration read from '; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param ProcessResultInterface $process |
||
| 14 | * |
||
| 15 | * @return bool True if chain should continue |
||
| 16 | */ |
||
| 17 | 13 | public function parsingFoundResult(ProcessResultInterface $process) |
|
| 18 | { |
||
| 19 | 13 | $results = $this->getResultsFromOutput($process->getOutput()); |
|
| 20 | |||
| 21 | 13 | if ($results != '') { |
|
| 22 | 11 | $cleanResults = preg_replace('/[^WFIESR.]+/', '', $results); |
|
| 23 | 11 | $process->setTestResults(str_split($cleanResults)); |
|
|
|
|||
| 24 | 11 | } |
|
| 25 | |||
| 26 | 13 | return true; |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $output |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | 13 | private function getResultsFromOutput($output) |
|
| 52 | } |
||
| 53 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.