From 39d632fd4a91713f2bd61cb7cbd4f3cabccf24c8 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 13 Oct 2014 19:52:06 +1300 Subject: [PATCH] preliminary clean up - improve tear down function --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 2 ++ tests/phpunit/api/v3/ContributionTest.php | 14 +------------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index cd87688d6a..16bf0bd303 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -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', diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index 1cd0a39f44..29e23bf168 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -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() { -- 2.25.1