}
/**
- * check with complete array + custom field
+ * Check with complete array + custom field
* Note that the test is written on purpose without any
* variables specific to participant so it can be replicated into other entities
* and / or moved to the automated test suite
///////////////// civicrm_participant_get methods
/**
- * check with wrong params type
+ * Check with wrong params type
*/
function testGetWrongParamsType() {
$params = 'a string';
}
/**
- * check with participant_id
+ * Check with participant_id
*/
function testGetParticipantIdOnly() {
$params = array(
}
/**
- * check with params id
+ * Check with params id
*/
function testGetParamsAsIdOnly() {
$params = array(
}
/**
- * check with params id
+ * Check with params id
*/
function testGetNestedEventGet() {
//create a second event & add participant to it.
$this->assertEquals($result['values'][$this->_participantID]['participant_source'], 'Wimbeldon');
$this->assertEquals($this->_eventID, $result['values'][$this->_participantID]['api.event.get']['id']);
}
- /*
- * Check Participant Get respects return properties
- */
+
+ /**
+ * Check Participant Get respects return properties
+ */
function testGetWithReturnProperties() {
$params = array(
'contact_id' => $this->_contactID, 'return.status_id' => 1,
}
/**
- * check with contact_id
+ * Check with contact_id
*/
function testGetContactIdOnly() {
$params = array(
}
/**
- * check with event_id
+ * Check with event_id
* fetch first record
*/
function testGetMultiMatchReturnFirst() {
}
/**
- * check with event_id
+ * Check with event_id
* in v3 this should return all participants
*/
function testGetMultiMatchNoReturnFirst() {
}
/**
- * check with participant_id
+ * Check with participant_id
*/
function testSearchParticipantIdOnly() {
$params = array(
}
/**
- * check with contact_id
+ * Check with contact_id
*/
function testSearchContactIdOnly() {
// Should get 2 participant records for this contact.
}
/**
- * check with event_id
+ * Check with event_id
*/
function testSearchByEvent() {
// Should get >= 3 participant records for this event. Also testing that last_name and event_title are returned.
}
/**
- * check with event_id
+ * Check with event_id
* fetch with limit
*/
function testSearchByEventWithLimit() {
}
/**
- * check with event_id
+ * Check with event_id
*/
function testCreateMissingContactID() {
$params = array(
}
/**
- * check with contact_id
+ * Check with contact_id
* without event_id
*/
function testCreateMissingEventID() {
}
/**
- * check with contact_id & event_id
+ * Check with contact_id & event_id
*/
function testCreateEventIdOnly() {
$params = array(
}
/**
- * check with complete array
+ * Check with complete array
*/
function testCreateAllParams() {
$params = $this->_params;
// assertDBState compares expected values in $match to actual values in the DB
$this->assertDBState('CRM_Event_DAO_Participant', $participant['id'], $params);
}
- /*
- * Test to check if receive date is being changed per CRM-9763
- */
+
+ /**
+ * Test to check if receive date is being changed per CRM-9763
+ */
function testCreateUpdateReceiveDate() {
$participant = $this->callAPISuccess('participant', 'create', $this->_params);
$update = array(
$this->callAPISuccess('participant', 'create', $update);
$this->getAndCheck(array_merge($this->_params, $update), $participant['id'], 'participant');
}
- /*
- * Test to check if participant fee level is being changed per CRM-9781
- */
+
+ /**
+ * Test to check if participant fee level is being changed per CRM-9781
+ */
function testCreateUpdateParticipantFeeLevel() {
$myParams = $this->_params + array('participant_fee_level' => CRM_Core_DAO::VALUE_SEPARATOR . "fee" . CRM_Core_DAO::VALUE_SEPARATOR);
$participant = $this->callAPISuccess('participant', 'create', $myParams);
}
/**
- * Test the line items for participant fee with multiple price field values.
- */
+ * Test the line items for participant fee with multiple price field values.
+ */
function testCreateParticipantLineItems() {
// Create a price set for this event.
}
/**
- * check with complete array
+ * Check with complete array
*/
function testUpdate() {
$participantId = $this->participantCreate(array(
}
/**
- * check with empty array
+ * Check with empty array
*/
function testUpdateEmptyParams() {
$params = array();
}
/**
- * check without event_id
+ * Check without event_id
*/
function testUpdateWithoutEventId() {
$participantId = $this->participantCreate(array('contactID' => $this->_individualId, 'eventID' => $this->_eventID));
}
/**
- * check with Invalid participantId
+ * Check with Invalid participantId
*/
function testUpdateWithWrongParticipantId() {
$params = array(
}
/**
- * check with Invalid ContactId
+ * Check with Invalid ContactId
*/
function testUpdateWithWrongContactId() {
$participantId = $this->participantCreate(array(
}
/**
- * check with participant_id
+ * Check with participant_id
*/
function testParticipantDelete() {
$params = array(
}
/**
- * check without participant_id
+ * Check without participant_id
* and with event_id
* This should return an error because required param is missing..
*/
$participant = $this->callAPIFailure('participant', 'delete', $params);
$this->assertNotNull($participant['error_message']);
}
- /*
- * delete with a get - a 'criteria delete'
- */
+
+ /**
+ * Delete with a get - a 'criteria delete'
+ */
function testNestedDelete() {
$description = "Criteria delete by nesting a GET & a DELETE";
$subfile = "NestedDelete";
$check = $this->callAPISuccess('participant', 'getcount', array());
$this->assertEquals(1, $check,"only one participant should be left. line " . __LINE__);
}
- /*
- * Test creation of a participant with an associated contribution
- */
+
+ /**
+ * Test creation of a participant with an associated contribution
+ */
function testCreateParticipantWithPayment() {
$description = "single function to create contact w partipation & contribution. Note that in the
case of 'contribution' the 'create' is implied (api.contribution.create)";