Example #1
0
 /**
  * check for Option Value
  */
 function testCustomFieldOptionValueDelete()
 {
     $customGroup = $this->customGroupCreate('Contact', 'ABC');
     $customOptionValueFields = $this->customFieldOptionValueCreate($customGroup, 'fieldABC');
     $customField =& civicrm_custom_field_delete($customOptionValueFields);
     $this->assertEquals($customField['is_error'], 0);
     $this->customGroupDelete($customGroup['id']);
 }
Example #2
0
 /**
  * Function to delete custom field
  * 
  * @param int $customFieldID
  */
 function customFieldDelete($customFieldID)
 {
     //$this->fail( 'civicrm_custom_field_delete seems to be broken!');
     $params['result']['customFieldId'] = $customFieldID;
     $result =& civicrm_custom_field_delete($params);
     if (civicrm_error($result)) {
         throw new Exception('Could not delete custom field');
     }
     return;
 }