From: Tim Otten Date: Thu, 19 Sep 2019 19:16:23 +0000 (-0400) Subject: Api3TestTrait - Only run api4 tests if api4 is present X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bfbc2403f8c806c9445a6c5d43e9affff17d4deb;p=civicrm-core.git Api3TestTrait - Only run api4 tests if api4 is present --- diff --git a/Civi/Test/Api3TestTrait.php b/Civi/Test/Api3TestTrait.php index 1c99c0490b..5e6b25075e 100644 --- a/Civi/Test/Api3TestTrait.php +++ b/Civi/Test/Api3TestTrait.php @@ -22,7 +22,12 @@ trait Api3TestTrait { * @return array */ public function versionThreeAndFour() { - return [[3], [4]]; + $r = [[3]]; + global $civicrm_root; + if (file_exists("$civicrm_root/Civi/Api4") || file_exists("$civicrm_root/ext/api4")) { + $r[] = [4]; + } + return $r; } /**