From 59c1dcb4c544e5471618d92236e0c2ba7185a240 Mon Sep 17 00:00:00 2001
From: Eileen McNaughton <emcnaughton@wikimedia.org>
Date: Tue, 24 Aug 2021 07:48:09 +1200
Subject: [PATCH] Test cleanup fix

---
 tests/phpunit/CiviTest/CiviUnitTestCase.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php
index 3a8726c6467..974af7a03fd 100644
--- a/tests/phpunit/CiviTest/CiviUnitTestCase.php
+++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php
@@ -29,6 +29,7 @@
 use Civi\Api4\Contribution;
 use Civi\Api4\CustomField;
 use Civi\Api4\CustomGroup;
+use Civi\Api4\FinancialType;
 use Civi\Api4\LineItem;
 use Civi\Api4\OptionGroup;
 use Civi\Api4\RelationshipType;
@@ -1926,6 +1927,9 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
     $this->restoreDefaultPriceSetConfig();
     $this->disableTaxAndInvoicing();
     $this->setCurrencySeparators(',');
+    FinancialType::delete(FALSE)->addWhere(
+      'name', 'NOT IN', ['Donation' , 'Member Dues', 'Campaign Contribution', 'Event Fee']
+    )->execute();
     CRM_Core_PseudoConstant::flush('taxRates');
     System::singleton()->flushProcessors();
     // @fixme this parameter is leaking - it should not be defined as a class static
-- 
GitLab