Skip to content

Commit afb88b4

Browse files
kubawerlossebastianbergmann
authored andcommitted
Adding fix
1 parent d9d7efa commit afb88b4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Util/PHP/AbstractPhpProcess.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use __PHP_Incomplete_Class;
1313
use ErrorException;
14+
use PHPUnit\Framework\AssertionFailedError;
1415
use PHPUnit\Framework\Exception;
1516
use PHPUnit\Framework\SyntheticError;
1617
use PHPUnit\Framework\Test;
@@ -248,6 +249,14 @@ private function processChildResult(Test $test, TestResult $result, string $stdo
248249

249250
$childResult = \unserialize(\str_replace("#!/usr/bin/env php\n", '', $stdout));
250251
\restore_error_handler();
252+
253+
if ($childResult === false) {
254+
$result->addFailure(
255+
$test,
256+
new AssertionFailedError('Test was run in child process and ended unexpectedly'),
257+
$time
258+
);
259+
}
251260
} catch (ErrorException $e) {
252261
\restore_error_handler();
253262
$childResult = false;

0 commit comments

Comments
 (0)