Making phpunit plugin log the TAP string in the event it fails to process it.

This commit is contained in:
Dan Cryer 2014-05-07 10:20:21 +01:00
parent 1dbb7cec1e
commit f40f88a0f3

View file

@ -132,9 +132,16 @@ class PhpUnit implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
$success &= $this->runDir($this->directory);
}
$output = $this->phpci->getLastOutput();
$tapParser = new TapParser($output);
$output = $tapParser->parse();
$tapString = $this->phpci->getLastOutput();
try {
$tapParser = new TapParser($tapString);
$output = $tapParser->parse();
} catch (\Exception $ex) {
$this->phpci->logFailure($tapString);
throw $ex;
}
$failures = $tapParser->getTotalFailures();
$this->build->storeMeta('phpunit-errors', $failures);