From: Eileen McNaughton Date: Mon, 3 Apr 2023 23:47:07 +0000 (+1200) Subject: [TESTS] Fix some campaign cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=37444e11495ce23237579e01b0e3471b7fd81d76;p=civicrm-core.git [TESTS] Fix some campaign cleanup --- diff --git a/tests/phpunit/CRM/Batch/Form/EntryTest.php b/tests/phpunit/CRM/Batch/Form/EntryTest.php index 0d2a918f2e..6b7424262f 100644 --- a/tests/phpunit/CRM/Batch/Form/EntryTest.php +++ b/tests/phpunit/CRM/Batch/Form/EntryTest.php @@ -158,6 +158,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase { */ public function tearDown(): void { $this->quickCleanUpFinancialEntities(); + $this->quickCleanup(['civicrm_campaign']); $this->relationshipTypeDelete($this->relationshipTypeID); if ($this->callAPISuccessGetCount('membership', ['id' => $this->membershipTypeID])) { $this->membershipTypeDelete(['id' => $this->membershipTypeID]); diff --git a/tests/phpunit/CRM/Core/BAO/CustomGroupTest.php b/tests/phpunit/CRM/Core/BAO/CustomGroupTest.php index f7abbdd37d..abb2a17da1 100644 --- a/tests/phpunit/CRM/Core/BAO/CustomGroupTest.php +++ b/tests/phpunit/CRM/Core/BAO/CustomGroupTest.php @@ -23,7 +23,7 @@ class CRM_Core_BAO_CustomGroupTest extends CiviUnitTestCase { * @throws \CRM_Core_Exception */ public function tearDown(): void { - $this->quickCleanup(['civicrm_contact'], TRUE); + $this->quickCleanup(['civicrm_contact', 'civicrm_campaign'], TRUE); parent::tearDown(); } diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php index ffb6e65509..0a9bfbc779 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php @@ -39,6 +39,7 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { public function tearDown(): void { $this->quickCleanUpFinancialEntities(); + $this->quickCleanup(['civicrm_campaign']); $this->restoreMembershipTypes(); parent::tearDown(); } diff --git a/tests/phpunit/CRM/Core/Payment/PayPalIPNTest.php b/tests/phpunit/CRM/Core/Payment/PayPalIPNTest.php index 60a5e6dba1..e34000819b 100644 --- a/tests/phpunit/CRM/Core/Payment/PayPalIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/PayPalIPNTest.php @@ -55,6 +55,7 @@ class CRM_Core_Payment_PayPalIPNTest extends CiviUnitTestCase { */ public function tearDown(): void { $this->quickCleanUpFinancialEntities(); + $this->quickCleanup(['civicrm_campaign']); parent::tearDown(); } diff --git a/tests/phpunit/CRM/Core/Payment/PaypalProTest.php b/tests/phpunit/CRM/Core/Payment/PaypalProTest.php index fd34449568..94dbc7663b 100644 --- a/tests/phpunit/CRM/Core/Payment/PaypalProTest.php +++ b/tests/phpunit/CRM/Core/Payment/PaypalProTest.php @@ -29,6 +29,7 @@ class CRM_Core_Payment_PaypalProTest extends CiviUnitTestCase { public function tearDown(): void { $this->quickCleanUpFinancialEntities(); + $this->quickCleanup(['civicrm_campaign']); parent::tearDown(); }