From b73c0abc3a7f179a9f7fa2e3a51b338767b40523 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 18 Oct 2019 19:29:44 -0700 Subject: [PATCH] Unit tests - Update for api4 in core --- ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php | 2 +- ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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(); } -- 2.25.1