Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1986278

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

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -180,27 +180,7 @@ 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-
}
194-
195-
if (!file_exists($component = array_pop($argv))) {
196-
$component = basename($oldPwd);
197-
}
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-
}
183+
include "$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit";
204184
}
205185

206186
exit($exit);

0 commit comments

Comments
 (0)