Skip to content

Commit

Permalink
Adding fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos authored and sebastianbergmann committed Dec 5, 2019
1 parent d9d7efa commit afb88b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Util/PHP/AbstractPhpProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use __PHP_Incomplete_Class;
use ErrorException;
use PHPUnit\Framework\AssertionFailedError;
use PHPUnit\Framework\Exception;
use PHPUnit\Framework\SyntheticError;
use PHPUnit\Framework\Test;
Expand Down Expand Up @@ -248,6 +249,14 @@ private function processChildResult(Test $test, TestResult $result, string $stdo

$childResult = \unserialize(\str_replace("#!/usr/bin/env php\n", '', $stdout));
\restore_error_handler();

if ($childResult === false) {
$result->addFailure(
$test,
new AssertionFailedError('Test was run in child process and ended unexpectedly'),
$time
);
}
} catch (ErrorException $e) {
\restore_error_handler();
$childResult = false;
Expand Down

0 comments on commit afb88b4

Please sign in to comment.