$this->getCustomFieldName('select_date') => [
'name' => $this->getCustomFieldName('select_date'),
'type' => 4,
- 'title' => 'test_date',
+ 'title' => 'Test Date',
'headerPattern' => '//',
'import' => 1,
'custom_field_id' => $this->getCustomFieldID('select_date'),
'text_length' => NULL,
'data_type' => 'Date',
'html_type' => 'Select Date',
- 'is_search_range' => '0',
+ 'is_search_range' => '1',
'date_format' => 'mm/dd/yy',
'time_format' => '1',
'id' => $this->getCustomFieldID('select_date'),
- 'label' => 'test_date',
+ 'label' => 'Test Date',
'groupTitle' => 'Custom Group',
'default_value' => '20090711',
'custom_group_id' => $customGroupID,
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
],
+ $this->getCustomFieldName('int') => [
+ 'name' => $this->getCustomFieldName('int'),
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => 'Enter integer here',
+ 'headerPattern' => '//',
+ 'import' => 1,
+ 'custom_field_id' => $this->getCustomFieldID('int'),
+ 'options_per_line' => NULL,
+ 'text_length' => NULL,
+ 'data_type' => 'Int',
+ 'html_type' => 'Text',
+ 'is_search_range' => '1',
+ 'id' => $this->getCustomFieldID('int'),
+ 'label' => 'Enter integer here',
+ 'groupTitle' => 'Custom Group',
+ 'default_value' => '4',
+ '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' => '1',
+ 'table_name' => 'civicrm_value_custom_group_' . $customGroupID,
+ 'column_name' => $this->getCustomFieldColumnName('int'),
+ 'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('int'),
+ 'extends_table' => 'civicrm_contact',
+ 'search_table' => 'contact_a',
+ ],
];
$this->assertEquals($expected, CRM_Core_BAO_CustomField::getFieldsForImport());
}