From 81e1a644fb35132166e988f03f336f58b79ea0ed Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 26 Jul 2013 17:18:44 +1200 Subject: [PATCH] CRM-13072 fix ParticipantTest (more) --- tests/phpunit/api/v3/ParticipantTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/api/v3/ParticipantTest.php b/tests/phpunit/api/v3/ParticipantTest.php index 1b4ea3ac82..007aff789f 100644 --- a/tests/phpunit/api/v3/ParticipantTest.php +++ b/tests/phpunit/api/v3/ParticipantTest.php @@ -577,19 +577,20 @@ class api_v3_ParticipantTest extends CiviUnitTestCase { $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'); - $this->assertEquals(1, $participants['count'], "only one participant should be left. line " . __LINE__); + $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 */ function testCreateParticipantWithPayment() { - $this->_contributionTypeId = $this->contributionTypeCreate(); $description = "single function to create contact w partipation & contribution. Note that in the case of 'contribution' the 'create' is implied (api.contribution.create)"; $subfile = "CreateParticipantPayment"; $params = array( 'contact_type' => 'Individual', - 'display_name' => 'dlobo', 'api.participant' => array( + 'display_name' => 'dlobo', + 'api.participant' => array( 'event_id' => $this->_eventID, 'status_id' => 1, 'role_id' => 1, -- 2.25.1