Stop setting header rows only to unset them
[civicrm-core.git] / tools / scripts / phpunit
index 8f034a2ee02517cce69c1c8b7fd13d31f4f77a4a..f3c5d6172461bff4eb680eae8a701f23592233e0 100755 (executable)
 if (PHP_SAPI !== 'cli') {
   die("phpunit can only be run from command line.");
 }
-
-$phpunit = findCommand('phpunit4');
+if (version_compare(PHP_VERSION, '5.6', '>=')) {
+  $phpunit = findCommand('phpunit5');
+}
+else {
+  $phpunit = findCommand('phpunit4');
+}
 if (!$phpunit) {
   $phpunit = findCommand('phpunit');
 }