From: Eileen McNaughton Date: Fri, 14 May 2021 07:14:40 +0000 (+1200) Subject: Save test X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ef18d791439a0200b9e2c1ebe08cc14bddc65966;p=civicrm-core.git Save test --- 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);