fixes to test cleanup routine
authorEileen McNaughton <eileen@fuzion.co.nz>
Tue, 15 Jul 2014 22:48:23 +0000 (10:48 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Tue, 15 Jul 2014 22:48:23 +0000 (10:48 +1200)
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/ContributionTest.php

index 8c54795b20d57c754d535290f791b948bffd254f..c482511a1ae7391f88ff922a3b0c7546d45ad5ac 100644 (file)
@@ -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')");
index 73fce6b58faef5fe59afc7fa27a2dbf7aa02041e..dd95b8ddb10edc6cac10f24a0bcf5b04cb3f8742 100644 (file)
@@ -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']));
   }