Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: Unscheduled
-
Fix Version/s: Unscheduled
-
Component/s: CiviCRM API
-
Labels:None
Description
I wrote a test to check participant_get accepts 'participant_role_id' as a filter.
It is failing on $role = CRM_Event_PseudoConstant::participantRole(); so I suspect the problem may be with the test / constant not the api
http://forum.civicrm.org/index.php/topic,19778.0.html
/**
- check get with role id - create 2 registrations with different roles.
- Test that get without role var returns 2 & with returns one
*/
function testGetParamsRole() { $participantRole2 = civicrm_api('Participant', 'Create', array('version' => 3, 'id' => $this->_participantID2, 'role_id' => 2)); $params = array( 'version' => $this->_apiversion, ); $result = & civicrm_api3_participant_get($params); $this->assertEquals($result['is_error'], 0); $this->assertEquals($result['count'], 3); $params['participant_role_id'] =2; $result = & civicrm_api3_participant_get($params); $this->assertEquals($result['is_error'], 0, $result['error_message'] . "in line " . __LINE__); $this->assertEquals(2,$result['count'], "in line " . __LINE__); $this->documentMe($params,$result ,__FUNCTION__,__FILE__); }