diff --git a/README.md b/README.md index f3094a62..bb740aed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ ParaTest ======== [![Build Status](https://secure.travis-ci.org/brianium/paratest.png?branch=master)](https://travis-ci.org/brianium/paratest) +[![HHVM Status](http://hhvm.h4cc.de/badge/brianium/paratest.svg)](http://hhvm.h4cc.de/package/brianium/paratest) The objective of ParaTest is to support parallel testing in a variety of PHP testing tools. Currently only PHPUnit is supported. diff --git a/src/ParaTest/Runners/PHPUnit/ExecutableTest.php b/src/ParaTest/Runners/PHPUnit/ExecutableTest.php index 015e98ff..3e2770b3 100644 --- a/src/ParaTest/Runners/PHPUnit/ExecutableTest.php +++ b/src/ParaTest/Runners/PHPUnit/ExecutableTest.php @@ -247,4 +247,9 @@ public function getCoverageFileName() return $this->coverageFileName; } + + public function getStdout() + { + return $this->process->getOutput(); + } } diff --git a/src/ParaTest/Runners/PHPUnit/Runner.php b/src/ParaTest/Runners/PHPUnit/Runner.php index f3e1d5f9..c4f39a2b 100644 --- a/src/ParaTest/Runners/PHPUnit/Runner.php +++ b/src/ParaTest/Runners/PHPUnit/Runner.php @@ -220,8 +220,13 @@ private function testIsStillRunning($test) $test->stop(); if ($this->options->stopOnFailure && $test->getExitCode() > 0) $this->pending = array(); - if (static::PHPUNIT_FATAL_ERROR === $test->getExitCode()) - throw new \Exception($test->getStderr()); + if (static::PHPUNIT_FATAL_ERROR === $test->getExitCode()) { + $errorOutput = $test->getStderr(); + if (!$errorOutput) { + $errorOutput = $test->getStdout(); + } + throw new \Exception($errorOutput); + } $this->printer->printFeedback($test); if ($this->hasCoverage()) { $this->addCoverage($test);