From: Eileen McNaughton Date: Tue, 15 Jul 2014 22:48:23 +0000 (+1200) Subject: fixes to test cleanup routine X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1cf3c2b12178f08639f681ced2aa8d7e5c9ebca9;p=civicrm-core.git fixes to test cleanup routine --- 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'])); }