Skip to content

Commit

Permalink
Use PHPUnit8 for main runs
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed May 23, 2021
1 parent 2038289 commit 04c46da
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/scripts/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ $argFilters = [];
if (PHP_SAPI !== 'cli') {
die("phpunit can only be run from command line.");
}
if (version_compare(PHP_VERSION, '7.1', '>=')) {
if (version_compare(PHP_VERSION, '7.2', '>=')) {
$phpunit = findCommand('phpunit8');
$argFilters[] = function ($argv) {
$pos = array_search('--tap', $argv);
if ($pos !== FALSE) {
array_splice($argv, $pos, 1, ['--printer', '\Civi\Test\TAP']);
}
return $argv;
};
}
elseif (version_compare(PHP_VERSION, '7.1', '>=')) {
$phpunit = findCommand('phpunit7');
$argFilters[] = function ($argv) {
$pos = array_search('--tap', $argv);
Expand Down

0 comments on commit 04c46da

Please sign in to comment.