CRM-13072 fix ParticipantTest (more)
authoreileen <eileen@fuzion.co.nz>
Fri, 26 Jul 2013 05:18:44 +0000 (17:18 +1200)
committereileen <eileen@fuzion.co.nz>
Fri, 26 Jul 2013 05:18:44 +0000 (17:18 +1200)
tests/phpunit/api/v3/ParticipantTest.php

index 1b4ea3ac82fd19b4c10e9b1e7d01cf4c7f8cc373..007aff789febc32629338e1b0b16fb20f25c8897 100644 (file)
@@ -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,