From ef18d791439a0200b9e2c1ebe08cc14bddc65966 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 14 May 2021 19:14:40 +1200 Subject: [PATCH] Save test --- tests/phpunit/CRM/Core/BAO/CustomFieldTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/CRM/Core/BAO/CustomFieldTest.php b/tests/phpunit/CRM/Core/BAO/CustomFieldTest.php index 288a4fc0c0..b4761aca45 100644 --- a/tests/phpunit/CRM/Core/BAO/CustomFieldTest.php +++ b/tests/phpunit/CRM/Core/BAO/CustomFieldTest.php @@ -1,5 +1,7 @@ customGroupCreate([ 'extends' => 'Individual', 'title' => 'my bulk group', ]); - CRM_Core_BAO_CustomField::bulkSave([ + CustomField::save(FALSE)->setRecords([ [ 'label' => 'Test', 'data_type' => 'String', @@ -967,12 +969,12 @@ class CRM_Core_BAO_CustomFieldTest extends CiviUnitTestCase { 'html_type' => 'Link', 'is_search_range' => '0', ], - ], + ])->setDefaults( [ 'custom_group_id' => $customGroup['id'], 'is_active' => 1, 'is_searchable' => 1, - ]); + ])->execute(); $dao = CRM_Core_DAO::executeQuery(('SHOW CREATE TABLE ' . $customGroup['values'][$customGroup['id']]['table_name'])); $dao->fetch(); $this->assertContains('`test_link_2` varchar(255) COLLATE ' . CRM_Core_BAO_SchemaHandler::getInUseCollation() . ' DEFAULT NULL', $dao->Create_Table); -- 2.25.1