8000 [PhpUnitBridge] run PHPUnit in the same process · symfony/symfony@02ef903 · GitHub
[go: up one dir, main page]

Skip to content

Commit 02ef903

Browse files
committed
[PhpUnitBridge] run PHPUnit in the same process
1 parent 61a67ec commit 02ef903

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -180,27 +180,11 @@ if ($components) {
180180
}
181181
}
182182
} elseif (!isset($argv[1]) || 'install' !== $argv[1] || file_exists('install')) {
183-
// Run regular phpunit in a subprocess
184-
185-
$errFile = tempnam(sys_get_temp_dir(), 'phpunit.stderr.');
186-
if ($proc = proc_open(sprintf($cmd, '', ' 2> '.escapeshellarg($errFile)), array(1 => array('pipe', 'w')), $pipes)) {
187-
stream_copy_to_stream($pipes[1], STDOUT);
188-
fclose($pipes[1]);
189-
$exit = proc_close($proc);
190-
191-
readfile($errFile);
192-
unlink($errFile);
193-
}
183+
include "$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit";
194184

195185
if (!file_exists($component = array_pop($argv))) {
196186
$component = basename($oldPwd);
197187
}
198-
199-
if ($exit) {
200-
echo "\033[41mKO\033[0m $component\n\n";
201-
} else {
202-
echo "\033[32mOK\033[0m $component\n\n";
203-
}
204188
}
205189

206190
exit($exit);

0 commit comments

Comments
 (0)
0