/** * Function to delete event * * @param int $id ID of the event */ function eventDelete($id) { $params = array('event_id' => $id); civicrm_event_delete($params); }
function testDeleteWithWrongEventId() { $params = array('event_id' => $this->_eventId); $result =& civicrm_event_delete($params); // try to delete again - there's no such event anymore $params = array('event_id' => $this->_eventId); $result =& civicrm_event_delete($params); $this->assertEquals($result['is_error'], 1); }