Custom::deleteGroup($customGroup);
}
+ function testCreateCustomfieldName() {
+ $customGroup = Custom::createGroup(array(), 'Individual');
+ $fields = array(
+ 'label' => 'testFld 2',
+ 'name' => 'special_fldlname',
+ 'data_type' => 'String',
+ 'html_type' => 'Text',
+ 'custom_group_id' => $customGroup->id,
+ );
+ $customField = CRM_Core_BAO_CustomField::create($fields);
+ $customFieldID = $this->assertDBNotNull('CRM_Core_DAO_CustomField', $customGroup->id, 'id', 'custom_group_id',
+ 'Database check for created CustomField.'
+ );
+ $dbFieldName = $this->assertDBNotNull('CRM_Core_DAO_CustomField', $customFieldID, 'name', 'id', 'Database check for edited CustomField.');
+ $this->assertEquals($fields['name'], $dbFieldName,
+ "Column name set as specified");
+
+ Custom::deleteGroup($customGroup);
+ }
+
+
function testGetFields() {
$customGroup = Custom::createGroup(array(), 'Individual');
$fields = array(