From: Tim Otten Date: Sat, 19 Oct 2019 02:29:44 +0000 (-0700) Subject: Unit tests - Update for api4 in core X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b73c0abc3a7f179a9f7fa2e3a51b338767b40523;p=civicrm-core.git Unit tests - Update for api4 in core --- diff --git a/ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php b/ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php index 288141f8d6..d7e9629908 100644 --- a/ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php +++ b/ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php @@ -18,7 +18,7 @@ class CRM_Afform_UtilTest extends \PHPUnit\Framework\TestCase implements Headles public function setUpHeadless() { return \Civi\Test::headless() ->installMe(__DIR__) - ->install(['org.civicrm.api4']) + ->install(version_compare(CRM_Utils_System::version(), '5.19', '<') ? ['org.civicrm.api4'] : []) ->apply(); } diff --git a/ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php b/ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php index 6d3e9907af..9df221ba69 100644 --- a/ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php +++ b/ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php @@ -14,7 +14,8 @@ abstract class api_v4_AfformTestCase extends \PHPUnit\Framework\TestCase impleme */ public function setUpHeadless() { return \Civi\Test::headless() - ->install(['org.civicrm.api4', 'org.civicrm.afform', 'org.civicrm.afform-mock']) + ->install(version_compare(CRM_Utils_System::version(), '5.19', '<') ? ['org.civicrm.api4'] : []) + ->install(['org.civicrm.afform', 'org.civicrm.afform-mock']) ->apply(); }