now take in account the errors in the codeception plugin (#1206)
This commit is contained in:
parent
ffa593f1a3
commit
e567088a00
|
@ -20,6 +20,7 @@ class Codeception implements ParserInterface
|
||||||
protected $totalTests;
|
protected $totalTests;
|
||||||
protected $totalTimeTaken;
|
protected $totalTimeTaken;
|
||||||
protected $totalFailures;
|
protected $totalFailures;
|
||||||
|
protected $totalErrors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Builder $phpci
|
* @param Builder $phpci
|
||||||
|
@ -47,6 +48,7 @@ class Codeception implements ParserInterface
|
||||||
$this->totalTests += (int) $testsuite['tests'];
|
$this->totalTests += (int) $testsuite['tests'];
|
||||||
$this->totalTimeTaken += (float) $testsuite['time'];
|
$this->totalTimeTaken += (float) $testsuite['time'];
|
||||||
$this->totalFailures += (int) $testsuite['failures'];
|
$this->totalFailures += (int) $testsuite['failures'];
|
||||||
|
$this->totalErrors += (int) $testsuite['errors'];
|
||||||
|
|
||||||
foreach ($testsuite->testcase as $testcase) {
|
foreach ($testsuite->testcase as $testcase) {
|
||||||
$testresult = array(
|
$testresult = array(
|
||||||
|
@ -67,9 +69,9 @@ class Codeception implements ParserInterface
|
||||||
$testresult['feature'] = sprintf('%s::%s', $testresult['class'], $testresult['name']);
|
$testresult['feature'] = sprintf('%s::%s', $testresult['class'], $testresult['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($testcase->failure)) {
|
if (isset($testcase->failure) || isset($testcase->error)) {
|
||||||
$testresult['pass'] = false;
|
$testresult['pass'] = false;
|
||||||
$testresult['message'] = (string) $testcase->failure;
|
$testresult['message'] = isset($testcase->failure) ? (string) $testcase->failure : (string) $testcase->error;
|
||||||
} else {
|
} else {
|
||||||
$testresult['pass'] = true;
|
$testresult['pass'] = true;
|
||||||
}
|
}
|
||||||
|
@ -108,6 +110,6 @@ class Codeception implements ParserInterface
|
||||||
*/
|
*/
|
||||||
public function getTotalFailures()
|
public function getTotalFailures()
|
||||||
{
|
{
|
||||||
return $this->totalFailures;
|
return $this->totalFailures + $this->totalErrors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue