PhpUnitJunit loads file in a separate function
This commit is contained in:
parent
3cdedcd972
commit
e4febf6d25
|
@ -17,13 +17,13 @@ class PhpUnitResultJunit extends PhpUnitResult
|
|||
*/
|
||||
public function parse()
|
||||
{
|
||||
$suites = simplexml_load_file($this->outputFile);
|
||||
|
||||
// Reset the parsing variables
|
||||
$this->results = [];
|
||||
$this->errors = [];
|
||||
$this->failures = 0;
|
||||
|
||||
$suites = $this->loadResultFile();
|
||||
|
||||
foreach ($suites->xpath('//testcase') as $testCase) {
|
||||
$this->parseTestcase($testCase);
|
||||
}
|
||||
|
@ -127,4 +127,16 @@ class PhpUnitResultJunit extends PhpUnitResult
|
|||
|
||||
return $msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SimpleXMLElement
|
||||
*/
|
||||
private function loadResultFile()
|
||||
{
|
||||
if (true) {
|
||||
$suites = simplexml_load_file($this->outputFile);
|
||||
}
|
||||
|
||||
return $suites;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue