/** * Check civicrm_note_delete */ function testDelete() { $params = array('id' => $this->_noteID, 'entity_id' => $this->_note['entity_id']); $deleteNote =& civicrm_note_delete($params); $this->assertEquals($deleteNote['is_error'], 0); $this->assertEquals($deleteNote['result'], 1); }
/** * Function to delete note * * @params int $noteID * */ function noteDelete($params) { require_once 'api/v2/Note.php'; $result =& civicrm_note_delete($params); if (CRM_Utils_Array::value('is_error', $result)) { throw new Exception('Could not delete note'); } return; }