From: Eileen McNaughton <emcnaughton@wikimedia.org> Date: Mon, 23 Aug 2021 19:48:09 +0000 (+1200) Subject: Test cleanup fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=59c1dcb4c544e5471618d92236e0c2ba7185a240;p=civicrm-core.git Test cleanup fix --- diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 3a8726c646..974af7a03f 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