From 1cf3c2b12178f08639f681ced2aa8d7e5c9ebca9 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 16 Jul 2014 10:48:23 +1200 Subject: [PATCH] fixes to test cleanup routine --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 1 + tests/phpunit/api/v3/ContributionTest.php | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 8c54795b20..c482511a1a 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -2377,6 +2377,7 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) 'civicrm_participant', 'civicrm_participant_payment', 'civicrm_pledge', + 'civicrm_price_set_entity', ); $this->quickCleanup($tablesToTruncate); CRM_Core_DAO::executeQuery("DELETE FROM civicrm_membership_status WHERE name NOT IN('New', 'Current', 'Grace', 'Expired', 'Pending', 'Cancelled', 'Deceased')"); diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index 73fce6b58f..dd95b8ddb1 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -1299,13 +1299,12 @@ class api_v3_ContributionTest extends CiviUnitTestCase { } function cleanUpAfterPriceSets() { + $this->quickCleanUpFinancialEntities(); $this->contactDelete($this->_ids['contact']); - $this->quickCleanup(array('civicrm_price_set_entity', 'civicrm_line_item', 'civicrm_contribution', 'civicrm_membership', 'civicrm_membership_payment')); $this->callAPISuccess('price_field_value', 'delete', array('id' => $this->_ids['price_field_value'][0])); $this->callAPISuccess('price_field_value', 'delete', array('id' => $this->_ids['price_field_value'][1])); $this->callAPISuccess('price_field', 'delete', array('id' => $this->_ids['price_field'][0])); $this->callAPISuccess('price_set', 'delete', array('id' => $this->_ids['price_set'])); - $this->membershipTypeDelete(array('id' => $this->_ids['membership_type'])); } -- 2.25.1