Ejemplo n.º 1
0
 /**
  * check without participant_id
  * and with event_id
  * This should return an error because required param is missing.. 
  */
 function testParticipantDeleteMissingID()
 {
     $params = array('event_id' => $this->_eventID);
     $participant =& civicrm_participant_delete($params);
     $this->assertEquals($participant['is_error'], 1);
     $this->assertNotNull($participant['error_message']);
 }
Ejemplo n.º 2
0
 /**
  * Function to delete participant 
  * 
  * @param int $participantID
  */
 function participantDelete($participantID)
 {
     require_once 'api/v2/Participant.php';
     $params = array('id' => $participantID);
     $result =& civicrm_participant_delete($params);
     if (CRM_Utils_Array::value('is_error', $result)) {
         throw new Exception('Could not delete participant');
     }
     return;
 }