From bc4d424dcf99ae2981abd86d3271ba4fb71ae048 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Sat, 13 Nov 2021 14:00:43 -0500 Subject: [PATCH] CRM --- tests/phpunit/CRM/Activity/Form/ActivityViewTest.php | 1 + tests/phpunit/CRM/Activity/Form/SearchTest.php | 1 + tests/phpunit/CRM/Contact/BAO/ActivitySearchTest.php | 1 + tests/phpunit/CRM/Contact/BAO/ContactType/ContactTest.php | 1 + tests/phpunit/CRM/Contact/BAO/ContactType/RelationshipTest.php | 1 + tests/phpunit/CRM/Contact/BAO/GroupTest.php | 1 + tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php | 1 + tests/phpunit/CRM/Contact/Page/View/UserDashBoardTest.php | 1 + tests/phpunit/CRM/Contribute/BAO/ContributionTypeTest.php | 1 + tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php | 1 + .../CRM/Contribute/Form/ContributionPageTranslationTest.php | 1 + tests/phpunit/CRM/Contribute/Form/ContributionTest.php | 1 + tests/phpunit/CRM/Contribute/Form/Task/StatusTest.php | 1 + tests/phpunit/CRM/Core/BAO/LocationTest.php | 1 + tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php | 1 + tests/phpunit/CRM/Core/Payment/BaseIPNTest.php | 1 + tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php | 1 + tests/phpunit/CRM/Core/SessionTest.php | 1 + tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php | 1 + tests/phpunit/CRM/Event/BAO/ChangeFeeSelectionTest.php | 1 + tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php | 1 + tests/phpunit/CRM/Mailing/BAO/QueryTest.php | 1 + tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php | 1 + tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php | 1 + tests/phpunit/CRM/Member/Form/MembershipTest.php | 1 + tests/phpunit/CRM/Member/Form/Task/BatchTest.php | 1 + tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php | 1 + tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php | 1 + tests/phpunit/CRM/Queue/Queue/SqlTest.php | 1 + tests/phpunit/CRM/Queue/QueueTest.php | 1 + tests/phpunit/CRM/Queue/RunnerTest.php | 1 + tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php | 1 + 32 files changed, 32 insertions(+) diff --git a/tests/phpunit/CRM/Activity/Form/ActivityViewTest.php b/tests/phpunit/CRM/Activity/Form/ActivityViewTest.php index 4982cd59cd..88c8e0e318 100644 --- a/tests/phpunit/CRM/Activity/Form/ActivityViewTest.php +++ b/tests/phpunit/CRM/Activity/Form/ActivityViewTest.php @@ -16,6 +16,7 @@ class CRM_Activity_Form_ActivityViewTest extends CiviUnitTestCase { 'civicrm_activity_contact', ]; $this->quickCleanup($tablesToTruncate); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Activity/Form/SearchTest.php b/tests/phpunit/CRM/Activity/Form/SearchTest.php index e2a4f956b8..c0c98fded5 100644 --- a/tests/phpunit/CRM/Activity/Form/SearchTest.php +++ b/tests/phpunit/CRM/Activity/Form/SearchTest.php @@ -21,6 +21,7 @@ class CRM_Activity_Form_SearchTest extends CiviUnitTestCase { 'civicrm_activity_contact', ]; $this->quickCleanup($tablesToTruncate); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contact/BAO/ActivitySearchTest.php b/tests/phpunit/CRM/Contact/BAO/ActivitySearchTest.php index 78e3bdb3b5..03e2288909 100644 --- a/tests/phpunit/CRM/Contact/BAO/ActivitySearchTest.php +++ b/tests/phpunit/CRM/Contact/BAO/ActivitySearchTest.php @@ -98,6 +98,7 @@ class CRM_Contact_BAO_ActivitySearchTest extends CiviUnitTestCase { if (!empty($type['count'])) { $this->callAPISuccess('option_value', 'delete', ['id' => $this->test_activity_type_id]); } + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contact/BAO/ContactType/ContactTest.php b/tests/phpunit/CRM/Contact/BAO/ContactType/ContactTest.php index 64a28032a5..2777d558ee 100644 --- a/tests/phpunit/CRM/Contact/BAO/ContactType/ContactTest.php +++ b/tests/phpunit/CRM/Contact/BAO/ContactType/ContactTest.php @@ -56,6 +56,7 @@ class CRM_Contact_BAO_ContactType_ContactTest extends CiviUnitTestCase { DELETE FROM civicrm_contact_type WHERE name IN ('{$this->student}','{$this->parent}','{$this->sponsor}', '{$this->team}');"; CRM_Core_DAO::executeQuery($query); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contact/BAO/ContactType/RelationshipTest.php b/tests/phpunit/CRM/Contact/BAO/ContactType/RelationshipTest.php index 8d1ce0af6d..c2ff108942 100644 --- a/tests/phpunit/CRM/Contact/BAO/ContactType/RelationshipTest.php +++ b/tests/phpunit/CRM/Contact/BAO/ContactType/RelationshipTest.php @@ -86,6 +86,7 @@ DELETE FROM civicrm_contact_type WHERE name IN ('{$this->student}','{$this->parent}','{$this->sponsor}'); "; CRM_Core_DAO::executeQuery($query); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contact/BAO/GroupTest.php b/tests/phpunit/CRM/Contact/BAO/GroupTest.php index e013805d06..6408583617 100644 --- a/tests/phpunit/CRM/Contact/BAO/GroupTest.php +++ b/tests/phpunit/CRM/Contact/BAO/GroupTest.php @@ -27,6 +27,7 @@ class CRM_Contact_BAO_GroupTest extends CiviUnitTestCase { */ protected function tearDown(): void { $this->quickCleanup(['civicrm_mapping_field', 'civicrm_mapping', 'civicrm_group', 'civicrm_saved_search']); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php b/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php index 69bfc6a5ce..bfce41175f 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php @@ -40,6 +40,7 @@ class CRM_Contact_BAO_SavedSearchTest extends CiviUnitTestCase { 'civicrm_custom_field', 'civicrm_custom_group', ]); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contact/Page/View/UserDashBoardTest.php b/tests/phpunit/CRM/Contact/Page/View/UserDashBoardTest.php index ad602fd6d8..ae2a11287e 100644 --- a/tests/phpunit/CRM/Contact/Page/View/UserDashBoardTest.php +++ b/tests/phpunit/CRM/Contact/Page/View/UserDashBoardTest.php @@ -52,6 +52,7 @@ class CRM_Contact_Page_View_UserDashBoardTest extends CiviUnitTestCase { CRM_Core_Session::singleton()->reset(); CRM_Core_Smarty::singleton()->clearTemplateVars(); $this->callAPISuccess('Contact', 'delete', ['id' => $this->contactID]); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contribute/BAO/ContributionTypeTest.php b/tests/phpunit/CRM/Contribute/BAO/ContributionTypeTest.php index aca4e92b5f..528b200300 100644 --- a/tests/phpunit/CRM/Contribute/BAO/ContributionTypeTest.php +++ b/tests/phpunit/CRM/Contribute/BAO/ContributionTypeTest.php @@ -22,6 +22,7 @@ class CRM_Contribute_BAO_ContributionTypeTest extends CiviUnitTestCase { public function tearDown(): void { $this->financialAccountDelete('Donations'); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php index f57137d687..8c7d6509b4 100644 --- a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php @@ -25,6 +25,7 @@ class CRM_Contribute_Form_Contribution_ConfirmTest extends CiviUnitTestCase { */ public function tearDown(): void { $this->quickCleanUpFinancialEntities(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php index 8bd9015a1d..f4240b3ea6 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php @@ -28,6 +28,7 @@ class CRM_Contribute_Form_ContributionPageTranslationTest extends CiviUnitTestCa if ($dbLocale) { CRM_Core_I18n_Schema::makeSinglelingual('en_US'); } + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php index 3bd82fd1dd..d36acacc72 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php @@ -126,6 +126,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { public function tearDown(): void { $this->quickCleanUpFinancialEntities(); $this->quickCleanup(['civicrm_note', 'civicrm_uf_match', 'civicrm_address']); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Contribute/Form/Task/StatusTest.php b/tests/phpunit/CRM/Contribute/Form/Task/StatusTest.php index 48b86b3cd7..15fe9d3dd9 100644 --- a/tests/phpunit/CRM/Contribute/Form/Task/StatusTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Task/StatusTest.php @@ -22,6 +22,7 @@ class CRM_Contribute_Form_Task_StatusTest extends CiviUnitTestCase { public function tearDown(): void { $this->quickCleanUpFinancialEntities(); CRM_Utils_Hook::singleton()->reset(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Core/BAO/LocationTest.php b/tests/phpunit/CRM/Core/BAO/LocationTest.php index 292d398a36..52adc2532a 100644 --- a/tests/phpunit/CRM/Core/BAO/LocationTest.php +++ b/tests/phpunit/CRM/Core/BAO/LocationTest.php @@ -45,6 +45,7 @@ class CRM_Core_BAO_LocationTest extends CiviUnitTestCase { 'civicrm_loc_block', ]; $this->quickCleanup($tablesToTruncate); + parent::tearDown(); } public function testCreateWithMissingParams() { diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php index 488ee868d0..2a38e9dab3 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php @@ -33,6 +33,7 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase { public function tearDown(): void { $this->quickCleanUpFinancialEntities(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php index 59ec6a7c9e..4c196d5c72 100644 --- a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php @@ -100,6 +100,7 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { public function tearDown(): void { $this->quickCleanUpFinancialEntities(); CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'name', TRUE); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php b/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php index ace9f34a04..fd763db77c 100644 --- a/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php @@ -49,6 +49,7 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase { */ public function tearDown(): void { $this->quickCleanUpFinancialEntities(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Core/SessionTest.php b/tests/phpunit/CRM/Core/SessionTest.php index 7cededd320..a3264feeed 100644 --- a/tests/phpunit/CRM/Core/SessionTest.php +++ b/tests/phpunit/CRM/Core/SessionTest.php @@ -7,6 +7,7 @@ class CRM_Core_SessionTest extends CiviUnitTestCase { public function setUp(): void { + parent::setUp(); CRM_Core_Smarty::singleton()->clearTemplateVars(); // set null defaults foreach (['infoOptions', 'infoType', 'infoMessage', 'infoTitle'] as $info) { diff --git a/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php b/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php index ca1ed20d8f..689ee060b3 100644 --- a/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php +++ b/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php @@ -43,6 +43,7 @@ class CRM_Event_BAO_AdditionalPaymentTest extends CiviUnitTestCase { public function tearDown(): void { $this->eventDelete($this->_eventId); $this->quickCleanUpFinancialEntities(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Event/BAO/ChangeFeeSelectionTest.php b/tests/phpunit/CRM/Event/BAO/ChangeFeeSelectionTest.php index 61952e14b8..bb3d248e39 100644 --- a/tests/phpunit/CRM/Event/BAO/ChangeFeeSelectionTest.php +++ b/tests/phpunit/CRM/Event/BAO/ChangeFeeSelectionTest.php @@ -81,6 +81,7 @@ class CRM_Event_BAO_ChangeFeeSelectionTest extends CiviUnitTestCase { public function tearDown(): void { $this->eventDelete($this->_eventId); $this->quickCleanUpFinancialEntities(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php b/tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php index 0258437bd5..8b2e82a338 100644 --- a/tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php +++ b/tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php @@ -26,6 +26,7 @@ class CRM_Financial_BAO_FinancialTypeTest extends CiviUnitTestCase { CRM_Core_I18n_Schema::makeSinglelingual('en_US'); } $this->financialAccountDelete('Donations'); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Mailing/BAO/QueryTest.php b/tests/phpunit/CRM/Mailing/BAO/QueryTest.php index a2b0a0f43e..19dbe5a844 100644 --- a/tests/phpunit/CRM/Mailing/BAO/QueryTest.php +++ b/tests/phpunit/CRM/Mailing/BAO/QueryTest.php @@ -29,6 +29,7 @@ class CRM_Mailing_BAO_QueryTest extends CiviUnitTestCase { 'civicrm_contact', ]; $this->quickCleanup($tablesToTruncate); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php b/tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php index 6af848e4db..94fd6f34a5 100644 --- a/tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php +++ b/tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php @@ -45,6 +45,7 @@ class CRM_Member_BAO_MembershipTypeTest extends CiviUnitTestCase { $this->membershipStatusDelete($this->_membershipStatusID); $this->contactDelete($this->_orgContactID); $this->contactDelete($this->_indiviContactID); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php b/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php index f1dbc3df9f..8b50ff875a 100644 --- a/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php +++ b/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php @@ -130,6 +130,7 @@ class CRM_Member_Form_MembershipRenewalTest extends CiviUnitTestCase { $this->callAPISuccess('contact', 'delete', ['id' => $contactID, 'skip_undelete' => TRUE]); } CRM_Utils_Time::resetTime(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Member/Form/MembershipTest.php b/tests/phpunit/CRM/Member/Form/MembershipTest.php index 74b51c473b..f4e24abc7d 100644 --- a/tests/phpunit/CRM/Member/Form/MembershipTest.php +++ b/tests/phpunit/CRM/Member/Form/MembershipTest.php @@ -171,6 +171,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase { ); $this->callAPISuccess('Contact', 'delete', ['id' => $this->ids['contact']['organization'], 'skip_undelete' => TRUE]); $this->callAPISuccess('RelationshipType', 'delete', ['id' => $this->ids['relationship_type']['member']]); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Member/Form/Task/BatchTest.php b/tests/phpunit/CRM/Member/Form/Task/BatchTest.php index 6a867170f8..230dd2c009 100644 --- a/tests/phpunit/CRM/Member/Form/Task/BatchTest.php +++ b/tests/phpunit/CRM/Member/Form/Task/BatchTest.php @@ -27,6 +27,7 @@ class CRM_Member_Form_Task_BatchTest extends CiviUnitTestCase { $this->validateAllContributions(); $this->validateAllPayments(); $this->quickCleanUpFinancialEntities(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php b/tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php index 3fe84c7288..f762b11286 100644 --- a/tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php +++ b/tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php @@ -22,6 +22,7 @@ class CRM_Member_Form_Task_PDFLetterTest extends CiviUnitTestCase { public function tearDown(): void { $this->quickCleanUpFinancialEntities(); CRM_Utils_Hook::singleton()->reset(); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php b/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php index 3a8562e7ae..abd90c5c3f 100644 --- a/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php +++ b/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php @@ -108,6 +108,7 @@ class CRM_Member_Import_Parser_MembershipTest extends CiviUnitTestCase { $this->membershipTypeDelete(['id' => $this->_membershipTypeID]); $this->membershipStatusDelete($this->_mebershipStatusID); $this->quickCleanup($tablesToTruncate, TRUE); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Queue/Queue/SqlTest.php b/tests/phpunit/CRM/Queue/Queue/SqlTest.php index 6f544387b0..27afee5115 100644 --- a/tests/phpunit/CRM/Queue/Queue/SqlTest.php +++ b/tests/phpunit/CRM/Queue/Queue/SqlTest.php @@ -49,6 +49,7 @@ class CRM_Queue_Queue_SqlTest extends CiviUnitTestCase { $tablesToTruncate = ['civicrm_queue_item']; $this->quickCleanup($tablesToTruncate); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Queue/QueueTest.php b/tests/phpunit/CRM/Queue/QueueTest.php index a79f30a717..90ae12131b 100644 --- a/tests/phpunit/CRM/Queue/QueueTest.php +++ b/tests/phpunit/CRM/Queue/QueueTest.php @@ -52,6 +52,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { $tablesToTruncate = ['civicrm_queue_item']; $this->quickCleanup($tablesToTruncate); + parent::tearDown(); } /** diff --git a/tests/phpunit/CRM/Queue/RunnerTest.php b/tests/phpunit/CRM/Queue/RunnerTest.php index ed1799a5b2..a50c740750 100644 --- a/tests/phpunit/CRM/Queue/RunnerTest.php +++ b/tests/phpunit/CRM/Queue/RunnerTest.php @@ -33,6 +33,7 @@ class CRM_Queue_RunnerTest extends CiviUnitTestCase { $tablesToTruncate = ['civicrm_queue_item']; $this->quickCleanup($tablesToTruncate); + parent::tearDown(); } public function testRunAllNormal() { diff --git a/tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php b/tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php index d72b557909..8458593386 100644 --- a/tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php +++ b/tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php @@ -12,6 +12,7 @@ class CRM_Utils_Migrate_ImportExportTest extends CiviUnitTestCase { 'civicrm_custom_field', ]; $this->quickCleanup($tablesToTruncate, TRUE); + parent::tearDown(); } /** -- 2.25.1