api_v3_ParticipantStatusTypeTest - Change quickCleanup() to useTransaction()
authorTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 20:40:59 +0000 (12:40 -0800)
committerTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 22:06:48 +0000 (14:06 -0800)
tests/phpunit/api/v3/ParticipantStatusTypeTest.php

index 4293b2e7c44a20a367ea40eb4ed549c448d8c0a3..48f1542d43fdbb8e9c189e0d168354799b9045cf 100644 (file)
@@ -36,7 +36,6 @@ class api_v3_ParticipantStatusTypeTest extends CiviUnitTestCase {
   protected $params;
   protected $id;
 
-
   public $DBResetRequired = FALSE;
 
   function setUp() {
@@ -52,10 +51,9 @@ class api_v3_ParticipantStatusTypeTest extends CiviUnitTestCase {
       'weight' => 10,
     );
     parent::setUp();
+    $this->useTransaction(TRUE);
   }
 
-  function tearDown() {}
-
   public function testCreateParticipantStatusType() {
     $result = $this->callAPIAndDocument('participant_status_type', 'create', $this->params, __FUNCTION__, __FILE__);
     $this->assertEquals(1, $result['count'], 'In line ' . __LINE__);
@@ -63,6 +61,9 @@ class api_v3_ParticipantStatusTypeTest extends CiviUnitTestCase {
   }
 
   public function testGetParticipantStatusType() {
+    $result = $this->callAPIAndDocument('participant_status_type', 'create', $this->params, __FUNCTION__, __FILE__);
+    $this->assertEquals(1, $result['count'], 'In line ' . __LINE__);
+
     $result = $this->callAPIAndDocument('participant_status_type', 'get', $this->params, __FUNCTION__, __FILE__);
     $this->assertEquals(1, $result['count'], 'In line ' . __LINE__);
     $this->assertNotNull($result['values'][$result['id']]['id'], 'In line ' . __LINE__);