* In conjunction with testing our existing function this tests the methods we want to migrate to
* to clean it up.
*
+ * @throws \API_Exception
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
+ * @throws \Civi\API\Exception\UnauthorizedException
*/
public function testLoadSavedMappingDirect() {
$this->entity = 'Contact';
'time_format' => NULL,
'is_required' => 0,
'table_name' => 'civicrm_value_custom_group_' . $customGroupID,
- 'column_name' => 'country_' . $this->getCustomFieldID('country'),
- 'where' => 'civicrm_value_custom_group_' . $customGroupID . '.country_' . $this->getCustomFieldID('country'),
+ 'column_name' => $this->getCustomFieldColumnName('country'),
+ 'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('country'),
+ 'extends_table' => 'civicrm_contact',
+ 'search_table' => 'contact_a',
+ 'pseudoconstant' => [
+ 'table' => 'civicrm_country',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ 'nameColumn' => 'iso_code',
+ ],
+ ],
+ $this->getCustomFieldName('multi_country') => [
+ 'name' => $this->getCustomFieldName('multi_country'),
+ 'type' => 1,
+ 'title' => 'Country-multi',
+ 'headerPattern' => '//',
+ 'import' => 1,
+ 'custom_field_id' => $this->getCustomFieldID('multi_country'),
+ 'options_per_line' => NULL,
+ 'text_length' => NULL,
+ 'data_type' => 'Country',
+ 'html_type' => 'Multi-Select Country',
+ 'is_search_range' => '0',
+ 'id' => $this->getCustomFieldID('multi_country'),
+ 'label' => 'Country-multi',
+ 'groupTitle' => 'Custom Group',
+ 'default_value' => NULL,
+ 'custom_group_id' => $customGroupID,
+ 'extends' => 'Contact',
+ 'extends_entity_column_value' => NULL,
+ 'extends_entity_column_id' => NULL,
+ 'is_view' => '0',
+ 'is_multiple' => '0',
+ 'option_group_id' => NULL,
+ 'date_format' => NULL,
+ 'time_format' => NULL,
+ 'is_required' => 0,
+ 'table_name' => 'civicrm_value_custom_group_' . $customGroupID,
+ 'column_name' => $this->getCustomFieldColumnName('multi_country'),
+ 'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('multi_country'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
'pseudoconstant' => [
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
],
+ $this->getCustomFieldName('state') => [
+ 'name' => $this->getCustomFieldName('state'),
+ 'id' => $this->getCustomFieldID('state'),
+ 'label' => 'State',
+ 'headerPattern' => '//',
+ 'title' => 'State',
+ 'custom_field_id' => $this->getCustomFieldID('state'),
+ 'groupTitle' => 'Custom Group',
+ 'default_value' => NULL,
+ 'custom_group_id' => $customGroupID,
+ 'extends' => 'Contact',
+ 'extends_entity_column_value' => NULL,
+ 'extends_entity_column_id' => NULL,
+ 'is_view' => '0',
+ 'is_multiple' => '0',
+ 'option_group_id' => NULL,
+ 'date_format' => NULL,
+ 'time_format' => NULL,
+ 'is_required' => 0,
+ 'table_name' => 'civicrm_value_custom_group_' . $customGroupID,
+ 'column_name' => $this->getCustomFieldColumnName('state'),
+ 'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('state'),
+ 'extends_table' => 'civicrm_contact',
+ 'search_table' => 'contact_a',
+ 'pseudoconstant' => [
+ 'table' => 'civicrm_state_province',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ ],
+ 'import' => 1,
+ 'data_type' => 'StateProvince',
+ 'type' => 1,
+ 'html_type' => 'Select State/Province',
+ 'text_length' => NULL,
+ 'options_per_line' => NULL,
+ 'is_search_range' => '0',
+ ],
+ $this->getCustomFieldName('multi_state') => [
+ 'id' => $this->getCustomFieldID('multi_state'),
+ 'label' => 'State-multi',
+ 'headerPattern' => '//',
+ 'title' => 'State-multi',
+ 'custom_field_id' => $this->getCustomFieldID('multi_state'),
+ 'groupTitle' => 'Custom Group',
+ 'default_value' => NULL,
+ 'custom_group_id' => $customGroupID,
+ 'extends' => 'Contact',
+ 'extends_entity_column_value' => NULL,
+ 'extends_entity_column_id' => NULL,
+ 'is_view' => '0',
+ 'is_multiple' => '0',
+ 'option_group_id' => NULL,
+ 'date_format' => NULL,
+ 'time_format' => NULL,
+ 'is_required' => 0,
+ 'table_name' => 'civicrm_value_custom_group_' . $customGroupID,
+ 'column_name' => $this->getCustomFieldColumnName('multi_state'),
+ 'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('multi_state'),
+ 'extends_table' => 'civicrm_contact',
+ 'search_table' => 'contact_a',
+ 'pseudoconstant' => [
+ 'table' => 'civicrm_state_province',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ ],
+ 'import' => 1,
+ 'data_type' => 'StateProvince',
+ 'name' => $this->getCustomFieldName('multi_state'),
+ 'type' => 1,
+ 'html_type' => 'Multi-Select State/Province',
+ 'text_length' => NULL,
+ 'options_per_line' => NULL,
+ 'is_search_range' => '0',
+ ],
+ $this->getCustomFieldName('boolean') => [
+ 'id' => $this->getCustomFieldID('boolean'),
+ 'label' => 'Yes No',
+ 'headerPattern' => '//',
+ 'title' => 'Yes No',
+ 'custom_field_id' => $this->getCustomFieldID('boolean'),
+ 'groupTitle' => 'Custom Group',
+ 'default_value' => NULL,
+ 'custom_group_id' => $customGroupID,
+ 'extends' => 'Contact',
+ 'extends_entity_column_value' => NULL,
+ 'extends_entity_column_id' => NULL,
+ 'is_view' => '0',
+ 'is_multiple' => '0',
+ 'option_group_id' => NULL,
+ 'date_format' => NULL,
+ 'time_format' => NULL,
+ 'is_required' => 0,
+ 'table_name' => 'civicrm_value_custom_group_' . $customGroupID,
+ 'column_name' => $this->getCustomFieldColumnName('boolean'),
+ 'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('boolean'),
+ 'extends_table' => 'civicrm_contact',
+ 'search_table' => 'contact_a',
+ 'import' => 1,
+ 'data_type' => 'Boolean',
+ 'name' => $this->getCustomFieldName('boolean'),
+ 'type' => 16,
+ 'html_type' => 'Radio',
+ 'text_length' => NULL,
+ 'options_per_line' => NULL,
+ 'is_search_range' => '0',
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_SelectValues::boolean',
+ ],
+ ],
];
$this->assertEquals($expected, CRM_Core_BAO_CustomField::getFieldsForImport());
}
* The conversion to date picker will result int these fields
* being renamed _high & _low and needing to return correctly.
*
+ * @throws \API_Exception
* @throws \CRM_Core_Exception
+ * @throws \Civi\API\Exception\UnauthorizedException
*/
public function testSearchCustomDataDateHighLow() {
$this->createCustomGroupWithFieldOfType([], 'date');
* The conversion to date picker will result int these fields
* being renamed _high & _low and needing to return correctly.
*
+ * @throws \API_Exception
* @throws \CRM_Core_Exception
+ * @throws \Civi\API\Exception\UnauthorizedException
*/
public function testSearchCustomDataDateLowWithPermsInPlay() {
$this->createLoggedInUser();
'default_value' => NULL,
]);
$dateCustomFieldName = 'custom_' . $dateCustomField['id'];
- $this->individualCreate([$dateCustomFieldName => "2015-01-01"]);
+ $this->individualCreate([$dateCustomFieldName => '2015-01-01']);
// Assigning the relevant form value to be within a custom key is normally done in
// build field params. It would be better if it were all done in convertFormValues
// but for now we just imitate it.
/**
* Test search builder style query including custom address fields.
*
+ * @throws \API_Exception
* @throws \CRM_Core_Exception
+ * @throws \Civi\API\Exception\UnauthorizedException
*/
public function testAddressCustomFields() {
$this->createCustomGroupWithFieldOfType(['extends' => 'Address'], 'int');
* Create a custom group with a single field.
*
* @param array $groupParams
+ * Params for the group to be created.
* @param string $customFieldType
*
* @param string $identifier
* @throws \Civi\API\Exception\UnauthorizedException
*/
public function createCustomGroupWithFieldOfType($groupParams = [], $customFieldType = 'text', $identifier = NULL) {
- $supported = ['text', 'select', 'date', 'int'];
+ $supported = ['text', 'select', 'date', 'int', 'contact_reference'];
if (!in_array($customFieldType, $supported, TRUE)) {
throw new CRM_Core_Exception('we have not yet extracted other custom field types from createCustomFieldsOfAllTypes, Use consistent syntax when you do');
}
$groupParams['title'] = empty($groupParams['title']) ? $identifier . 'Group with field ' . $customFieldType : $groupParams['title'];
$groupParams['name'] = $identifier ?? 'Custom Group';
$this->createCustomGroup($groupParams);
+ $reference = &$this->ids['CustomField'][$identifier . $customFieldType];
+ $fieldParams = ['custom_group_id' => $this->ids['CustomGroup'][$groupParams['name']]];
switch ($customFieldType) {
case 'text':
- $customField = $this->createTextCustomField(['custom_group_id' => $this->ids['CustomGroup'][$groupParams['name']]]);
- break;
+ $reference = $this->createTextCustomField($fieldParams)['id'];
+ return;
case 'select':
- $customField = $this->createSelectCustomField(['custom_group_id' => $this->ids['CustomGroup'][$groupParams['name']]]);
- break;
+ $reference = $this->createSelectCustomField($fieldParams)['id'];
+ return;
case 'int':
- $customField = $this->createIntCustomField(['custom_group_id' => $this->ids['CustomGroup'][$groupParams['name']]]);
- break;
+ $reference = $this->createIntCustomField($fieldParams)['id'];
+ return;
case 'date':
- $customField = $this->createDateCustomField(['custom_group_id' => $this->ids['CustomGroup'][$groupParams['name']]]);
- break;
+ $reference = $this->createDateCustomField($fieldParams)['id'];
+ return;
+
+ case 'contact_reference':
+ $reference = $this->createContactReferenceCustomField($fieldParams)['id'];
+ return;
}
- $this->ids['CustomField'][$identifier . $customFieldType] = $customField['id'];
}
/**
$ids['link'] = (int) $this->createLinkCustomField(['custom_group_id' => $customGroupID])['id'];
$ids['file'] = (int) $this->createFileCustomField(['custom_group_id' => $customGroupID])['id'];
$ids['country'] = (int) $this->createCountryCustomField(['custom_group_id' => $customGroupID])['id'];
+ $ids['multi_country'] = (int) $this->createMultiCountryCustomField(['custom_group_id' => $customGroupID])['id'];
$ids['contact_reference'] = $this->createContactReferenceCustomField(['custom_group_id' => $customGroupID])['id'];
+ $ids['state'] = (int) $this->createStateCustomField(['custom_group_id' => $customGroupID])['id'];
+ $ids['multi_state'] = (int) $this->createMultiStateCustomField(['custom_group_id' => $customGroupID])['id'];
+ $ids['boolean'] = (int) $this->createBooleanCustomField(['custom_group_id' => $customGroupID])['id'];
return $ids;
}
return $this->callAPISuccess('CustomField', 'create', $params)['values'][0];
}
+ /**
+ * Create a custom text fields.
+ *
+ * @param array $params
+ * Parameter overrides, must include custom_group_id.
+ *
+ * @return array
+ */
+ protected function createBooleanCustomField($params = []) {
+ $params = array_merge($this->getFieldsValuesByType('Boolean'), $params);
+ return $this->callAPISuccess('CustomField', 'create', $params)['values'][0];
+ }
+
/**
* Create a custom text fields.
*
}
/**
- * Create a custom text fields.
+ * Create a custom country fields.
*
* @param array $params
* Parameter overrides, must include custom_group_id.
return $this->callAPISuccess('custom_field', 'create', $params)['values'][0];
}
+ /**
+ * Create a custom multi select country fields.
+ *
+ * @param array $params
+ * Parameter overrides, must include custom_group_id.
+ *
+ * @return array
+ */
+ protected function createMultiCountryCustomField($params = []) {
+ $params = array_merge($this->getFieldsValuesByType('Country', 'Multi-Select Country'), $params);
+ return $this->callAPISuccess('custom_field', 'create', $params)['values'][0];
+ }
+
+ /**
+ * Create a custom state fields.
+ *
+ * @param array $params
+ * Parameter overrides, must include custom_group_id.
+ *
+ * @return array
+ */
+ protected function createStateCustomField($params = []) {
+ $params = array_merge($this->getFieldsValuesByType('StateProvince'), $params);
+ return $this->callAPISuccess('custom_field', 'create', $params)['values'][0];
+ }
+
+ /**
+ * Create a custom multi select state fields.
+ *
+ * @param array $params
+ * Parameter overrides, must include custom_group_id.
+ *
+ * @return array
+ */
+ protected function createMultiStateCustomField($params = []) {
+ $params = array_merge($this->getFieldsValuesByType('StateProvince', 'Multi-Select State/Province'), $params);
+ return $this->callAPISuccess('custom_field', 'create', $params)['values'][0];
+ }
+
/**
* Create a custom text fields.
*
],
],
],
+ 'Radio' => [
+ 'label' => 'Pick Color',
+ 'html_type' => 'Radio',
+ 'data_type' => 'String',
+ 'text_length' => '',
+ 'default_value' => '',
+ 'option_values' => [
+ [
+ 'label' => 'Red',
+ 'value' => 'R',
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => 'Yellow',
+ 'value' => 'Y',
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => 'Green',
+ 'value' => 'G',
+ 'weight' => 3,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
+ 'CheckBox' => [
+ 'label' => 'Pick Color',
+ 'html_type' => 'Checkbox',
+ 'data_type' => 'String',
+ 'text_length' => '',
+ 'default_value' => '',
+ 'option_values' => [
+ [
+ 'label' => 'Red',
+ 'value' => 'R',
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => 'Yellow',
+ 'value' => 'Y',
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => 'Green',
+ 'value' => 'G',
+ 'weight' => 3,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
+ 'Multi-Select' => [
+ 'label' => 'Pick Color',
+ 'html_type' => 'Multi-Select',
+ 'data_type' => 'String',
+ 'text_length' => '',
+ 'default_value' => '',
+ 'option_values' => [
+ [
+ 'label' => 'Red',
+ 'value' => 'R',
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => 'Yellow',
+ 'value' => 'Y',
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => 'Green',
+ 'value' => 'G',
+ 'weight' => 3,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
+ 'Autocomplete-Select' => [
+ 'label' => 'Pick Color',
+ 'html_type' => 'Autocomplete-Select',
+ 'data_type' => 'String',
+ 'text_length' => '',
+ 'default_value' => '',
+ 'option_values' => [
+ [
+ 'label' => 'Red',
+ 'value' => 'R',
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => 'Yellow',
+ 'value' => 'Y',
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => 'Green',
+ 'value' => 'G',
+ 'weight' => 3,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
],
'Int' => [
'default' => [
'default_value' => '4',
'is_search_range' => 1,
],
+ 'Select' => [
+ 'label' => 'Integer select',
+ 'html_type' => 'Select',
+ 'option_values' => [
+ [
+ 'label' => '50',
+ 'value' => 3,
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => '100',
+ 'value' => 4,
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
+ 'Radio' => [
+ 'label' => 'Integer radio',
+ 'html_type' => 'Radio',
+ 'option_values' => [
+ [
+ 'label' => '50',
+ 'value' => 3,
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => '100',
+ 'value' => 4,
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
],
'Date' => [
'default' => [
'time_format' => 1,
],
],
+ 'Float' => [
+ 'default' => [
+ 'label' => 'Number',
+ 'html_type' => 'Text',
+ 'data_type' => 'Float',
+ ],
+ 'Select' => [
+ 'label' => 'Number select',
+ 'html_type' => 'Select',
+ 'option_values' => [
+ [
+ 'label' => '50',
+ 'value' => 3,
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => '100',
+ 'value' => 4,
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
+ 'Radio' => [
+ 'label' => 'Number radio',
+ 'html_type' => 'Radio',
+ 'option_values' => [
+ [
+ 'label' => '50',
+ 'value' => 3,
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => '100',
+ 'value' => 4,
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
+ ],
+ 'Money' => [
+ 'default' => [
+ 'label' => 'Money',
+ 'html_type' => 'Text',
+ 'data_type' => 'Money',
+ ],
+ 'Select' => [
+ 'label' => 'Money select',
+ 'html_type' => 'Select',
+ 'option_values' => [
+ [
+ 'label' => '50',
+ 'value' => 3,
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => '100',
+ 'value' => 4,
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
+ 'Radio' => [
+ 'label' => 'Money radio',
+ 'html_type' => 'Radio',
+ 'option_values' => [
+ [
+ 'label' => '50',
+ 'value' => 3,
+ 'weight' => 1,
+ 'is_active' => 1,
+ ],
+ [
+ 'label' => '100',
+ 'value' => 4,
+ 'weight' => 2,
+ 'is_active' => 1,
+ ],
+ ],
+ ],
+ ],
+ 'Memo' => [
+ 'default' => [
+ 'label' => 'Memo',
+ 'html_type' => 'TextArea',
+ 'data_type' => 'Memo',
+ 'attributes' => 'rows=4, cols=60',
+ ],
+ 'RichTextEditor' => [
+ 'label' => 'Memo Rich Text Editor',
+ 'html_type' => 'Memo',
+ ],
+ ],
+ 'Boolean' => [
+ 'default' => [
+ 'data_type' => 'Boolean',
+ 'html_type' => 'Radio',
+ 'label' => 'Yes No',
+ ],
+ ],
+ 'StateProvince' => [
+ 'default' => [
+ 'data_type' => 'StateProvince',
+ 'html_type' => 'Select State/Province',
+ 'label' => 'State',
+ 'option_type' => 0,
+ ],
+ 'Multi-Select State/Province' => [
+ 'html_type' => 'Multi-Select State/Province',
+ 'label' => 'State-multi',
+ ],
+ ],
'Country' => [
'default' => [
'data_type' => 'Country',
'label' => 'Country',
'option_type' => 0,
],
+ 'Multi-Select Country' => [
+ 'html_type' => 'Multi-Select Country',
+ 'label' => 'Country-multi',
+ 'option_type' => 0,
+ ],
],
'File' => [
'default' => [
$dateField = $this->getCustomFieldName('select_date');
$selectField = $this->getCustomFieldName('select_string');
$countryField = $this->getCustomFieldName('country');
+ $multiCountryField = $this->getCustomFieldName('multi_country');
$referenceField = $this->getCustomFieldName('contact_reference');
+ $stateField = $this->getCustomFieldName('state');
+ $multiStateField = $this->getCustomFieldName('multi_state');
+ $booleanStateField = $this->getCustomFieldName('boolean');
$countriesByName = array_flip(CRM_Core_PseudoConstant::country(FALSE, FALSE));
+ $statesByName = array_flip(CRM_Core_PseudoConstant::stateProvince(FALSE, FALSE));
$customFieldValues = [
- // @todo fix the fatal bug on this & uncomment - see dev/core#723
$fileField => $file['id'],
$linkField => 'http://example.org',
$dateField => '2018-01-01 17:10:56',
$selectField => 'G',
$countryField => $countriesByName['New Zealand'],
+ $multiCountryField => [$countriesByName['New Zealand'], $countriesByName['Australia']],
$referenceField => $this->householdCreate(),
+ $stateField => $statesByName['Victoria'],
+ $multiStateField => [$statesByName['Victoria'], $statesByName['Tasmania']],
+ $booleanStateField => 1,
];
$this->callAPISuccess('Contact', 'create', array_merge([
'id' => $contact1,
}
}
+ /**
+ * Test merging a contact that is the target of a contact reference field on another contact.
+ *
+ * @throws \API_Exception
+ * @throws \CRM_Core_Exception
+ * @throws \Civi\API\Exception\UnauthorizedException
+ */
+ public function testMergeContactReferenceCustomFieldTarget() {
+ $this->createCustomGroupWithFieldOfType([], 'contact_reference');
+ $contact1 = $this->individualCreate();
+ $contact2 = $this->individualCreate();
+ $contact3 = $this->individualCreate([$this->getCustomFieldName('contact_reference') => $contact2]);
+ $this->callAPISuccess('contact', 'merge', [
+ 'to_keep_id' => $contact1,
+ 'to_remove_id' => $contact2,
+ 'auto_flip' => FALSE,
+ ]);
+ $this->assertEquals($contact1, $this->callAPISuccessGetValue('Contact', ['id' => $contact3, 'return' => $this->getCustomFieldName('contact_reference')]));
+ }
+
+ /**
+ * Test merging when a multiple record set is in use.
+ *
+ * @throws \API_Exception
+ * @throws \CRM_Core_Exception
+ * @throws \Civi\API\Exception\UnauthorizedException
+ */
+ public function testMergeMultipleCustomValues() {
+ $customGroupID = $this->createCustomGroup(['is_multiple' => TRUE]);
+ $this->ids['CustomField']['text'] = (int) $this->createTextCustomField(['custom_group_id' => $customGroupID])['id'];
+ $contact1 = $this->individualCreate([$this->getCustomFieldName('text') => 'blah']);
+ $contact2 = $this->individualCreate([$this->getCustomFieldName('text') => 'de blah']);
+ $this->callAPISuccess('contact', 'merge', [
+ 'to_keep_id' => $contact1,
+ 'to_remove_id' => $contact2,
+ 'auto_flip' => FALSE,
+ ]);
+ $column = $this->getCustomFieldColumnName('text');
+ $table = $this->getCustomGroupTable();
+ $this->assertEquals('blah,de blah', CRM_Core_DAO::singleValueQuery(
+ "SELECT GROUP_CONCAT({$column}) FROM $table WHERE entity_id = $contact1"
+ ));
+ }
+
/**
* Test retrieving merged contacts.
*
* Ensure format with return=group shows comma-separated group IDs.
*
* CRM-19426
+ *
+ * @throws \CRM_Core_Exception
*/
public function testContactGetReturnGroup() {
// Set up a contact, asser that they were created.