preliminary clean up - improve tear down function
authorEileen McNaughton <eileen@fuzion.co.nz>
Mon, 13 Oct 2014 06:52:06 +0000 (19:52 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Mon, 13 Oct 2014 06:52:06 +0000 (19:52 +1300)
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/ContributionTest.php

index cd87688d6a22afdd61eadb7ea6265eff50334890..16bf0bd3035fdbefd2a59283111ac604254d6096 100644 (file)
@@ -2362,7 +2362,9 @@ AND    ( TABLE_NAME LIKE 'civicrm_value_%' )
   function quickCleanUpFinancialEntities() {
     $tablesToTruncate = array(
       'civicrm_contribution',
+      'civicrm_contribution_soft',
       'civicrm_financial_trxn',
+      'civicrm_financial_item',
       'civicrm_contribution_recur',
       'civicrm_line_item',
       'civicrm_contribution_page',
index 1cd0a39f44dea5b068d3570162494388d61d0147..29e23bf168f8ee38fd9da666f7b9e976bbcc5731 100644 (file)
@@ -93,19 +93,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
   }
 
   function tearDown() {
-    $this->quickCleanup(array(
-      'civicrm_contribution',
-      'civicrm_contribution_soft',
-      'civicrm_event',
-      'civicrm_contribution_page',
-      'civicrm_participant',
-      'civicrm_participant_payment',
-      'civicrm_line_item',
-      'civicrm_financial_trxn',
-      'civicrm_financial_item',
-      'civicrm_entity_financial_trxn',
-      'civicrm_contact',
-    ));
+    $this->quickCleanUpFinancialEntities();
   }
 
   function testGetContribution() {