Improve cleanup on contact test
authorYour Name <you@example.com>
Fri, 7 May 2021 12:08:34 +0000 (00:08 +1200)
committerYour Name <you@example.com>
Fri, 7 May 2021 12:09:10 +0000 (00:09 +1200)
We are not deleting all financial entities, when created, meaning this
test can cause other tests to fail depending on the combo

tests/phpunit/api/v3/ContactTest.php

index 605501a2b83a4b614ed352f18cea85eb84efa926..87f76dbfed69825e5a506e30baa16305f5d73386 100644 (file)
@@ -85,22 +85,19 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     // truncate a few tables
     $tablesToTruncate = [
       'civicrm_email',
-      'civicrm_contribution',
-      'civicrm_line_item',
       'civicrm_website',
       'civicrm_relationship',
       'civicrm_uf_match',
       'civicrm_phone',
       'civicrm_address',
       'civicrm_acl_contact_cache',
-      'civicrm_activity_contact',
-      'civicrm_activity',
       'civicrm_group',
       'civicrm_group_contact',
       'civicrm_group_contact_cache',
       'civicrm_saved_search',
       'civicrm_prevnext_cache',
     ];
+    $this->quickCleanUpFinancialEntities();
 
     $this->quickCleanup($tablesToTruncate, TRUE);
     parent::tearDown();