function testTagDelete() { $tagID = $this->tagCreate(null); $params = array('tag_id' => $tagID); $tagDelete =& civicrm_tag_delete($params); $this->assertEquals($tagDelete['is_error'], 0); }
/** * Function to delete Tag * * @param int $tagId id of the tag to be deleted */ function tagDelete($tagId) { require_once 'api/v2/Tag.php'; $params['tag_id'] = $tagId; $result = civicrm_tag_delete($params); if (CRM_Utils_Array::value('is_error', $result)) { throw new Exception('Could not delete tag'); } return; }