From b19b754f068630aec094d6b0e031b3640a35cdb8 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 17 Sep 2020 16:22:20 +1200 Subject: [PATCH] dev/core#2039 Fix test to use set up method with more data integrity Using the api rather than CRM_Core_DAO::createTestObject to create the phone ensures it is created with is_primary. We might need to fix CRM_Core_DAO::createTestObject but for this case simply using the api suffices --- tests/phpunit/api/v3/ACLPermissionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/api/v3/ACLPermissionTest.php b/tests/phpunit/api/v3/ACLPermissionTest.php index 36b2a8aea7..fdbdabea1c 100644 --- a/tests/phpunit/api/v3/ACLPermissionTest.php +++ b/tests/phpunit/api/v3/ACLPermissionTest.php @@ -31,7 +31,7 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { public function setUp() { parent::setUp(); CRM_Core_DAO::createTestObject('CRM_Pledge_BAO_Pledge', [], 1, 0); - CRM_Core_DAO::createTestObject('CRM_Core_BAO_Phone', [], 1, 0); + $this->callAPISuccess('Phone', 'create', ['id' => $this->individualCreate(['email' => '']), 'phone' => '911', 'location_type_id' => 'Home']); $this->prepareForACLs(); } -- 2.25.1