+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
'contact_id' => $this->_contactID,
));
- $description = "use nested get to get an event";
+ $description = "Demonstrates use of nested get to fetch event data with participant records.";
$subfile = "NestedEventGet";
$params = array(
'id' => $this->_participantID,
);
$participant = $this->callAPISuccess('participant', 'get', $params);
- $this->assertEquals($participant['count'], 2, 'in line ' . __LINE__);
+ $this->assertEquals($participant['count'], 2);
}
///////////////// civicrm_participant_create methods
public function testUpdateWrongParamsType() {
$params = 'a string';
$result = $this->callAPIFailure('participant', 'create', $params);
- $this->assertEquals('Input variable `params` is not an array', $result['error_message'], 'In line ' . __LINE__);
+ $this->assertEquals('Input variable `params` is not an array', $result['error_message']);
}
/**
* Delete with a get - a 'criteria delete'
*/
public function testNestedDelete() {
- $description = "Criteria delete by nesting a GET & a DELETE";
+ $description = "Criteria delete by nesting a GET & a DELETE.";
$subfile = "NestedDelete";
$participants = $this->callAPISuccess('Participant', 'Get', array());
$this->assertEquals($participants['count'], 3);
$params = array('contact_id' => $this->_contactID2, 'api.participant.delete' => 1);
- $participants = $this->callAPIAndDocument('Participant', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile, 'Get');
+ $participants = $this->callAPIAndDocument('Participant', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile);
$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.
*/
public 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)";
+ $description = "Single function to create contact with partipation & contribution.
+ Note that in the case of 'contribution' the 'create' is implied (api.contribution.create)";
$subfile = "CreateParticipantPayment";
$params = array(
'contact_type' => 'Individual',