[TESTS] Fix some campaign cleanup
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 3 Apr 2023 23:47:07 +0000 (11:47 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 3 Apr 2023 23:47:07 +0000 (11:47 +1200)
tests/phpunit/CRM/Batch/Form/EntryTest.php
tests/phpunit/CRM/Core/BAO/CustomGroupTest.php
tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php
tests/phpunit/CRM/Core/Payment/PayPalIPNTest.php
tests/phpunit/CRM/Core/Payment/PaypalProTest.php

index 0d2a918f2e3207b88db223160f989de7dd89e61a..6b7424262fdeb53cfa43336da7f9d4386597d20d 100644 (file)
@@ -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]);
index f7abbdd37d11c1bdbb36eef63e5fb4a3a4da6960..abb2a17da11e4e6126ae17bdfbfd589dcede6c6b 100644 (file)
@@ -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();
   }
 
index ffb6e655092f60d4b78e207e5df2b25b43019ba8..0a9bfbc7799def810700c972eca8f10c977b6e5e 100644 (file)
@@ -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();
   }
index 60a5e6dba181cbee335eea425a3adc7907902fc0..e34000819bbd978e819d45296fb9788a6615f555 100644 (file)
@@ -55,6 +55,7 @@ class CRM_Core_Payment_PayPalIPNTest extends CiviUnitTestCase {
    */
   public function tearDown(): void {
     $this->quickCleanUpFinancialEntities();
+    $this->quickCleanup(['civicrm_campaign']);
     parent::tearDown();
   }
 
index fd344495682725fec487e90f736461621e70eeb2..94dbc7663bf9a82769d59499c1cec7401fda4608 100644 (file)
@@ -29,6 +29,7 @@ class CRM_Core_Payment_PaypalProTest extends CiviUnitTestCase {
 
   public function tearDown(): void {
     $this->quickCleanUpFinancialEntities();
+    $this->quickCleanup(['civicrm_campaign']);
     parent::tearDown();
   }