From dd09ee0cb6ce4958e4bd8171266cfa659c409482 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 25 Mar 2021 15:17:49 +1300 Subject: [PATCH] [PHPUNIT 8 ] Add void to more teardowns --- tests/phpunit/CRM/Extension/InfoTest.php | 2 +- tests/phpunit/CRM/Extension/Manager/ModuleTest.php | 2 +- tests/phpunit/CRM/Extension/Manager/PaymentTest.php | 2 +- tests/phpunit/CRM/Extension/Manager/SearchTest.php | 2 +- tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php | 2 +- tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php | 2 +- tests/phpunit/CRM/Financial/Form/PaymentEditTest.php | 2 +- tests/phpunit/CRM/Group/Page/AjaxTest.php | 2 +- tests/phpunit/CRM/Logging/LoggingTest.php | 2 +- tests/phpunit/CRM/Logging/SchemaTest.php | 2 +- tests/phpunit/CRM/Mailing/BAO/MailingTest.php | 2 +- tests/phpunit/CRM/Mailing/BAO/QueryTest.php | 2 +- tests/phpunit/CRM/Mailing/BAO/SpoolTest.php | 2 +- tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php | 2 +- tests/phpunit/CRM/Mailing/MailStoreTest.php | 2 +- tests/phpunit/CRM/Mailing/MailingSystemTest.php | 2 +- tests/phpunit/CRM/Member/BAO/MembershipLogTest.php | 2 +- tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php | 2 +- tests/phpunit/CRM/Member/BAO/MembershipTest.php | 2 +- tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php | 2 +- tests/phpunit/CRM/Member/Form/MembershipTest.php | 2 +- tests/phpunit/CRM/Member/Form/Task/BatchTest.php | 2 +- tests/phpunit/CRM/Member/Form/Task/PDFLetterCommonTest.php | 2 +- tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php | 2 +- tests/phpunit/CRM/PCP/BAO/PCPTest.php | 2 +- tests/phpunit/CRM/Pledge/Form/SearchTest.php | 2 +- tests/phpunit/CRM/Queue/Queue/SqlTest.php | 2 +- tests/phpunit/CRM/Queue/QueueTest.php | 2 +- tests/phpunit/CRM/Queue/RunnerTest.php | 2 +- tests/phpunit/CRM/Report/Form/ActivityTest.php | 2 +- tests/phpunit/CRM/SMS/BAO/ProviderTest.php | 2 +- tests/phpunit/CRM/SMS/PreviewTest.php | 2 +- tests/phpunit/CRM/SMS/ProviderTest.php | 2 +- tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php | 2 +- tests/phpunit/CRM/Utils/API/MatchOptionTest.php | 2 +- tests/phpunit/CRM/Utils/HookTest.php | 2 +- tests/phpunit/CRM/Utils/HttpClientTest.php | 2 +- tests/phpunit/CRM/Utils/Mail/EmailProcessorInboundTest.php | 2 +- tests/phpunit/CRM/Utils/Mail/EmailProcessorTest.php | 2 +- tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php | 2 +- tests/phpunit/CRM/Utils/ZipTest.php | 2 +- 41 files changed, 41 insertions(+), 41 deletions(-) diff --git a/tests/phpunit/CRM/Extension/InfoTest.php b/tests/phpunit/CRM/Extension/InfoTest.php index 77b46076ac..a6d0e9b44d 100644 --- a/tests/phpunit/CRM/Extension/InfoTest.php +++ b/tests/phpunit/CRM/Extension/InfoTest.php @@ -11,7 +11,7 @@ class CRM_Extension_InfoTest extends CiviUnitTestCase { $this->file = NULL; } - public function tearDown() { + public function tearDown(): void { if ($this->file) { unlink($this->file); } diff --git a/tests/phpunit/CRM/Extension/Manager/ModuleTest.php b/tests/phpunit/CRM/Extension/Manager/ModuleTest.php index f9a587d806..847337cdde 100644 --- a/tests/phpunit/CRM/Extension/Manager/ModuleTest.php +++ b/tests/phpunit/CRM/Extension/Manager/ModuleTest.php @@ -20,7 +20,7 @@ class CRM_Extension_Manager_ModuleTest extends CiviUnitTestCase { $this->setExtensionSystem($this->system); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->system = NULL; } diff --git a/tests/phpunit/CRM/Extension/Manager/PaymentTest.php b/tests/phpunit/CRM/Extension/Manager/PaymentTest.php index a4b7d947d2..d6bffc10e0 100644 --- a/tests/phpunit/CRM/Extension/Manager/PaymentTest.php +++ b/tests/phpunit/CRM/Extension/Manager/PaymentTest.php @@ -27,7 +27,7 @@ class CRM_Extension_Manager_PaymentTest extends CiviUnitTestCase { $this->quickCleanup(['civicrm_payment_processor']); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->system = NULL; $this->quickCleanup(['civicrm_payment_processor']); diff --git a/tests/phpunit/CRM/Extension/Manager/SearchTest.php b/tests/phpunit/CRM/Extension/Manager/SearchTest.php index 1f4e5964c8..ee4ec46433 100644 --- a/tests/phpunit/CRM/Extension/Manager/SearchTest.php +++ b/tests/phpunit/CRM/Extension/Manager/SearchTest.php @@ -17,7 +17,7 @@ class CRM_Extension_Manager_SearchTest extends CiviUnitTestCase { ]); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->system = NULL; } diff --git a/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php b/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php index 7be8734bbb..0d016f9007 100644 --- a/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php +++ b/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php @@ -22,7 +22,7 @@ class CRM_Financial_BAO_FinancialItemTest extends CiviUnitTestCase { /** * Clean up after each test. */ - public function tearDown() { + public function tearDown(): void { $this->quickCleanUpFinancialEntities(); parent::tearDown(); } diff --git a/tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php b/tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php index 5bb226dff4..a2d0b4a451 100644 --- a/tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php +++ b/tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php @@ -20,7 +20,7 @@ class CRM_Financial_BAO_FinancialTypeTest extends CiviUnitTestCase { $this->_orgContactID = $this->organizationCreate(); } - public function teardown() { + public function tearDown(): void { global $dbLocale; if ($dbLocale) { CRM_Core_I18n_Schema::makeSinglelingual('en_US'); diff --git a/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php b/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php index c300732d54..39042cfb40 100644 --- a/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php +++ b/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php @@ -31,7 +31,7 @@ class CRM_Financial_Form_PaymentEditTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function tearDown() { + public function tearDown(): void { $this->quickCleanUpFinancialEntities(); $this->quickCleanup(['civicrm_note', 'civicrm_uf_match', 'civicrm_address']); } diff --git a/tests/phpunit/CRM/Group/Page/AjaxTest.php b/tests/phpunit/CRM/Group/Page/AjaxTest.php index 6eb09d8bb1..5237cf2bfc 100644 --- a/tests/phpunit/CRM/Group/Page/AjaxTest.php +++ b/tests/phpunit/CRM/Group/Page/AjaxTest.php @@ -51,7 +51,7 @@ class CRM_Group_Page_AjaxTest extends CiviUnitTestCase { $this->groupCreate(['title' => 'not-me-active', 'is_active' => 1, 'name' => 'not-me-active']); } - public function tearDown() { + public function tearDown(): void { CRM_Utils_Hook::singleton()->reset(); $this->quickCleanup(['civicrm_group']); $config = CRM_Core_Config::singleton(); diff --git a/tests/phpunit/CRM/Logging/LoggingTest.php b/tests/phpunit/CRM/Logging/LoggingTest.php index 562450aaa4..c2623dd7e1 100644 --- a/tests/phpunit/CRM/Logging/LoggingTest.php +++ b/tests/phpunit/CRM/Logging/LoggingTest.php @@ -10,7 +10,7 @@ class CRM_Logging_LoggingTest extends CiviUnitTestCase { parent::setUp(); } - public function tearDown() { + public function tearDown(): void { CRM_Core_I18n_Schema::makeSinglelingual('en_US'); $logging = new CRM_Logging_Schema(); $logging->dropAllLogTables(); diff --git a/tests/phpunit/CRM/Logging/SchemaTest.php b/tests/phpunit/CRM/Logging/SchemaTest.php index 5b4c3ebe4c..110c6ffcc2 100644 --- a/tests/phpunit/CRM/Logging/SchemaTest.php +++ b/tests/phpunit/CRM/Logging/SchemaTest.php @@ -18,7 +18,7 @@ class CRM_Logging_SchemaTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function tearDown() { + public function tearDown(): void { $schema = new CRM_Logging_Schema(); $schema->disableLogging(); $this->databaseVersion = NULL; diff --git a/tests/phpunit/CRM/Mailing/BAO/MailingTest.php b/tests/phpunit/CRM/Mailing/BAO/MailingTest.php index acf200c466..69b039002d 100644 --- a/tests/phpunit/CRM/Mailing/BAO/MailingTest.php +++ b/tests/phpunit/CRM/Mailing/BAO/MailingTest.php @@ -20,7 +20,7 @@ class CRM_Mailing_BAO_MailingTest extends CiviUnitTestCase { parent::setUp(); } - public function tearDown() { + public function tearDown(): void { global $dbLocale; if ($dbLocale) { CRM_Core_I18n_Schema::makeSinglelingual('en_US'); diff --git a/tests/phpunit/CRM/Mailing/BAO/QueryTest.php b/tests/phpunit/CRM/Mailing/BAO/QueryTest.php index f5fcd8292c..218753b795 100644 --- a/tests/phpunit/CRM/Mailing/BAO/QueryTest.php +++ b/tests/phpunit/CRM/Mailing/BAO/QueryTest.php @@ -17,7 +17,7 @@ class CRM_Mailing_BAO_QueryTest extends CiviUnitTestCase { parent::setUp(); } - public function tearDown() { + public function tearDown(): void { $tablesToTruncate = [ 'civicrm_mailing_event_bounce', 'civicrm_mailing_event_delivered', diff --git a/tests/phpunit/CRM/Mailing/BAO/SpoolTest.php b/tests/phpunit/CRM/Mailing/BAO/SpoolTest.php index b23abe5aef..ae5be6bf09 100644 --- a/tests/phpunit/CRM/Mailing/BAO/SpoolTest.php +++ b/tests/phpunit/CRM/Mailing/BAO/SpoolTest.php @@ -19,7 +19,7 @@ class CRM_Mailing_BAO_SpoolTest extends CiviUnitTestCase { $this->_mut = new CiviMailUtils($this, TRUE); } - public function tearDown() { + public function tearDown(): void { $this->_mut->stop(); parent::tearDown(); } diff --git a/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php b/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php index 87670df9ff..f83d444e48 100644 --- a/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php +++ b/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php @@ -57,7 +57,7 @@ abstract class CRM_Mailing_BaseMailingSystemTest extends CiviUnitTestCase { /** */ - public function tearDown() { + public function tearDown(): void { $this->_mut->stop(); CRM_Utils_Hook::singleton()->reset(); // DGW diff --git a/tests/phpunit/CRM/Mailing/MailStoreTest.php b/tests/phpunit/CRM/Mailing/MailStoreTest.php index ba982b9d35..e4a549ff8c 100644 --- a/tests/phpunit/CRM/Mailing/MailStoreTest.php +++ b/tests/phpunit/CRM/Mailing/MailStoreTest.php @@ -14,7 +14,7 @@ class CRM_Mailing_MailStoreTest extends \CiviUnitTestCase { @unlink($this->workDir); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if (is_dir($this->workDir)) { CRM_Utils_File::cleanDir($this->workDir); diff --git a/tests/phpunit/CRM/Mailing/MailingSystemTest.php b/tests/phpunit/CRM/Mailing/MailingSystemTest.php index b1846cee7e..d80982020e 100644 --- a/tests/phpunit/CRM/Mailing/MailingSystemTest.php +++ b/tests/phpunit/CRM/Mailing/MailingSystemTest.php @@ -55,7 +55,7 @@ class CRM_Mailing_MailingSystemTest extends CRM_Mailing_BaseMailingSystemTest { $this->assertEquals('civimail', $context); } - public function tearDown() { + public function tearDown(): void { global $dbLocale; if ($dbLocale) { CRM_Core_I18n_Schema::makeSinglelingual('en_US'); diff --git a/tests/phpunit/CRM/Member/BAO/MembershipLogTest.php b/tests/phpunit/CRM/Member/BAO/MembershipLogTest.php index 9322190ad9..541b1d0cf4 100644 --- a/tests/phpunit/CRM/Member/BAO/MembershipLogTest.php +++ b/tests/phpunit/CRM/Member/BAO/MembershipLogTest.php @@ -101,7 +101,7 @@ class CRM_Member_BAO_MembershipLogTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function tearDown() { + public function tearDown(): void { $this->relationshipTypeDelete($this->relationshipTypeID); $this->quickCleanUpFinancialEntities(); $this->restoreMembershipTypes(); diff --git a/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php b/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php index f413ffd22b..156b40ed7d 100644 --- a/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php +++ b/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php @@ -15,7 +15,7 @@ */ class CRM_Member_BAO_MembershipStatusTest extends CiviUnitTestCase { - protected function tearDown() { + protected function tearDown(): void { foreach ($this->ids as $entity => $ids) { foreach ($ids as $id) { $this->callAPISuccess($entity, 'Delete', ['id' => $id]); diff --git a/tests/phpunit/CRM/Member/BAO/MembershipTest.php b/tests/phpunit/CRM/Member/BAO/MembershipTest.php index 83c6bbbc3d..ad5c9a1b09 100644 --- a/tests/phpunit/CRM/Member/BAO/MembershipTest.php +++ b/tests/phpunit/CRM/Member/BAO/MembershipTest.php @@ -34,7 +34,7 @@ class CRM_Member_BAO_MembershipTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function tearDown() { + public function tearDown(): void { $this->membershipTypeDelete(['id' => $this->_membershipTypeID]); $this->membershipStatusDelete($this->_membershipStatusID); $this->contactDelete($this->_contactID); diff --git a/tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php b/tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php index c7d855562d..0193316765 100644 --- a/tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php +++ b/tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php @@ -40,7 +40,7 @@ class CRM_Member_BAO_MembershipTypeTest extends CiviUnitTestCase { * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - public function tearDown() { + public function tearDown(): void { $this->relationshipTypeDelete($this->_relationshipTypeId); $this->membershipStatusDelete($this->_membershipStatusID); $this->contactDelete($this->_orgContactID); diff --git a/tests/phpunit/CRM/Member/Form/MembershipTest.php b/tests/phpunit/CRM/Member/Form/MembershipTest.php index bf80c7d6ad..c85d66598e 100644 --- a/tests/phpunit/CRM/Member/Form/MembershipTest.php +++ b/tests/phpunit/CRM/Member/Form/MembershipTest.php @@ -157,7 +157,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function tearDown() { + public function tearDown(): void { $this->quickCleanUpFinancialEntities(); $this->quickCleanup( [ diff --git a/tests/phpunit/CRM/Member/Form/Task/BatchTest.php b/tests/phpunit/CRM/Member/Form/Task/BatchTest.php index ce464ce497..6a867170f8 100644 --- a/tests/phpunit/CRM/Member/Form/Task/BatchTest.php +++ b/tests/phpunit/CRM/Member/Form/Task/BatchTest.php @@ -23,7 +23,7 @@ class CRM_Member_Form_Task_BatchTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function tearDown() { + public function tearDown(): void { $this->validateAllContributions(); $this->validateAllPayments(); $this->quickCleanUpFinancialEntities(); diff --git a/tests/phpunit/CRM/Member/Form/Task/PDFLetterCommonTest.php b/tests/phpunit/CRM/Member/Form/Task/PDFLetterCommonTest.php index cd9e2ee6e5..a2d14a1942 100644 --- a/tests/phpunit/CRM/Member/Form/Task/PDFLetterCommonTest.php +++ b/tests/phpunit/CRM/Member/Form/Task/PDFLetterCommonTest.php @@ -19,7 +19,7 @@ class CRM_Member_Form_Task_PDFLetterCommonTest extends CiviUnitTestCase { /** * Clean up after each test. */ - public function tearDown() { + public function tearDown(): void { $this->quickCleanUpFinancialEntities(); CRM_Utils_Hook::singleton()->reset(); } diff --git a/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php b/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php index 59de09c1ce..8fd040a7b4 100644 --- a/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php +++ b/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php @@ -96,7 +96,7 @@ class CRM_Member_Import_Parser_MembershipTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function tearDown() { + public function tearDown(): void { $tablesToTruncate = [ 'civicrm_membership', 'civicrm_membership_log', diff --git a/tests/phpunit/CRM/PCP/BAO/PCPTest.php b/tests/phpunit/CRM/PCP/BAO/PCPTest.php index 267b33d5db..798647f467 100644 --- a/tests/phpunit/CRM/PCP/BAO/PCPTest.php +++ b/tests/phpunit/CRM/PCP/BAO/PCPTest.php @@ -24,7 +24,7 @@ class CRM_PCP_BAO_PCPTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function tearDown() { + public function tearDown(): void { $this->quickCleanUpFinancialEntities(); parent::tearDown(); } diff --git a/tests/phpunit/CRM/Pledge/Form/SearchTest.php b/tests/phpunit/CRM/Pledge/Form/SearchTest.php index d8bba2d71c..0ff0e7750e 100644 --- a/tests/phpunit/CRM/Pledge/Form/SearchTest.php +++ b/tests/phpunit/CRM/Pledge/Form/SearchTest.php @@ -12,7 +12,7 @@ class CRM_Pledge_Form_SearchTest extends CiviUnitTestCase { $this->pledgeCreate(['contact_id' => $this->individualID]); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $tablesToTruncate = [ 'civicrm_activity', diff --git a/tests/phpunit/CRM/Queue/Queue/SqlTest.php b/tests/phpunit/CRM/Queue/Queue/SqlTest.php index 559f2b5b99..c7a4dccad4 100644 --- a/tests/phpunit/CRM/Queue/Queue/SqlTest.php +++ b/tests/phpunit/CRM/Queue/Queue/SqlTest.php @@ -44,7 +44,7 @@ class CRM_Queue_Queue_SqlTest extends CiviUnitTestCase { $this->queueService = CRM_Queue_Service::singleton(TRUE); } - public function tearDown() { + public function tearDown(): void { CRM_Utils_Time::resetTime(); $tablesToTruncate = ['civicrm_queue_item']; diff --git a/tests/phpunit/CRM/Queue/QueueTest.php b/tests/phpunit/CRM/Queue/QueueTest.php index 6578645299..8b114d402c 100644 --- a/tests/phpunit/CRM/Queue/QueueTest.php +++ b/tests/phpunit/CRM/Queue/QueueTest.php @@ -47,7 +47,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { $this->queueService = CRM_Queue_Service::singleton(TRUE); } - public function tearDown() { + public function tearDown(): void { CRM_Utils_Time::resetTime(); $tablesToTruncate = ['civicrm_queue_item']; diff --git a/tests/phpunit/CRM/Queue/RunnerTest.php b/tests/phpunit/CRM/Queue/RunnerTest.php index f82d2c79c8..f8dde4382e 100644 --- a/tests/phpunit/CRM/Queue/RunnerTest.php +++ b/tests/phpunit/CRM/Queue/RunnerTest.php @@ -25,7 +25,7 @@ class CRM_Queue_RunnerTest extends CiviUnitTestCase { self::$_recordedValues = []; } - public function tearDown() { + public function tearDown(): void { unset($this->queue); unset($this->queueService); diff --git a/tests/phpunit/CRM/Report/Form/ActivityTest.php b/tests/phpunit/CRM/Report/Form/ActivityTest.php index ae2ba0119e..97848fa4e1 100644 --- a/tests/phpunit/CRM/Report/Form/ActivityTest.php +++ b/tests/phpunit/CRM/Report/Form/ActivityTest.php @@ -28,7 +28,7 @@ class CRM_Report_Form_ActivityTest extends CiviReportTestCase { $this->quickCleanup($this->_tablesToTruncate); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); CRM_Core_DAO::executeQuery('DROP TEMPORARY TABLE IF EXISTS civireport_activity_temp_target'); } diff --git a/tests/phpunit/CRM/SMS/BAO/ProviderTest.php b/tests/phpunit/CRM/SMS/BAO/ProviderTest.php index 17a61c2fea..105193a290 100644 --- a/tests/phpunit/CRM/SMS/BAO/ProviderTest.php +++ b/tests/phpunit/CRM/SMS/BAO/ProviderTest.php @@ -30,7 +30,7 @@ class CRM_SMS_BAO_ProviderTest extends CiviUnitTestCase { /** * Clean up after each test. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->callAPISuccess('option_value', 'delete', ['id' => $this->option_value]); } diff --git a/tests/phpunit/CRM/SMS/PreviewTest.php b/tests/phpunit/CRM/SMS/PreviewTest.php index dfe82711c3..ce45dfa728 100644 --- a/tests/phpunit/CRM/SMS/PreviewTest.php +++ b/tests/phpunit/CRM/SMS/PreviewTest.php @@ -19,7 +19,7 @@ class CRM_SMS_PreviewTest extends CiviUnitTestCase { /** * Clean up after each test. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->callAPISuccess('option_value', 'delete', ['id' => $this->option_value]); } diff --git a/tests/phpunit/CRM/SMS/ProviderTest.php b/tests/phpunit/CRM/SMS/ProviderTest.php index 877b2f9a49..a1921f330b 100644 --- a/tests/phpunit/CRM/SMS/ProviderTest.php +++ b/tests/phpunit/CRM/SMS/ProviderTest.php @@ -32,7 +32,7 @@ class CRM_SMS_ProviderTest extends CiviUnitTestCase { /** * Clean up after each test. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->quickCleanup(['civicrm_email', 'civicrm_phone', 'civicrm_activity', 'civicrm_activity_contact']); $this->callAPISuccess('option_value', 'delete', ['id' => $this->option_value]); diff --git a/tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php b/tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php index c9a030bbd5..4eb202e778 100644 --- a/tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php +++ b/tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php @@ -7,7 +7,7 @@ class CRM_Upgrade_Incremental_BaseTest extends CiviUnitTestCase { use CRMTraits_Custom_CustomDataTrait; - public function tearDown() { + public function tearDown(): void { $this->quickCleanup(['civicrm_saved_search']); } diff --git a/tests/phpunit/CRM/Utils/API/MatchOptionTest.php b/tests/phpunit/CRM/Utils/API/MatchOptionTest.php index aa42826065..be36950452 100644 --- a/tests/phpunit/CRM/Utils/API/MatchOptionTest.php +++ b/tests/phpunit/CRM/Utils/API/MatchOptionTest.php @@ -27,7 +27,7 @@ class CRM_Utils_API_MatchOptionTest extends CiviUnitTestCase { ]); } - public function tearDown() { + public function tearDown(): void { $noise = $this->callAPISuccess('Contact', 'get', [ 'id' => $this->noise['individual'], 'return' => ['email'], diff --git a/tests/phpunit/CRM/Utils/HookTest.php b/tests/phpunit/CRM/Utils/HookTest.php index 6924840b6c..97419e2511 100644 --- a/tests/phpunit/CRM/Utils/HookTest.php +++ b/tests/phpunit/CRM/Utils/HookTest.php @@ -27,7 +27,7 @@ class CRM_Utils_HookTest extends CiviUnitTestCase { self::$activeTest = $this; } - public function tearDown() { + public function tearDown(): void { self::$activeTest = $this; parent::tearDown(); } diff --git a/tests/phpunit/CRM/Utils/HttpClientTest.php b/tests/phpunit/CRM/Utils/HttpClientTest.php index 39ca92d8cb..1ec1a6eade 100644 --- a/tests/phpunit/CRM/Utils/HttpClientTest.php +++ b/tests/phpunit/CRM/Utils/HttpClientTest.php @@ -37,7 +37,7 @@ class CRM_Utils_HttpClientTest extends CiviUnitTestCase { $this->client = new CRM_Utils_HttpClient(); } - public function tearDown() { + public function tearDown(): void { CRM_Core_DAO::executeQuery("DELETE FROM civicrm_setting WHERE name = 'verifySSL'"); CRM_Core_Config::singleton(TRUE); parent::tearDown(); diff --git a/tests/phpunit/CRM/Utils/Mail/EmailProcessorInboundTest.php b/tests/phpunit/CRM/Utils/Mail/EmailProcessorInboundTest.php index c461e0543d..b845c3620f 100644 --- a/tests/phpunit/CRM/Utils/Mail/EmailProcessorInboundTest.php +++ b/tests/phpunit/CRM/Utils/Mail/EmailProcessorInboundTest.php @@ -30,7 +30,7 @@ class CRM_Utils_Mail_EmailProcessorInboundTest extends CiviUnitTestCase { ])['id']; } - public function tearDown() { + public function tearDown(): void { CRM_Utils_File::cleanDir(__DIR__ . '/data/mail'); $this->callAPISuccess('MailSettings', 'delete', [ 'id' => $this->mailSettingsId, diff --git a/tests/phpunit/CRM/Utils/Mail/EmailProcessorTest.php b/tests/phpunit/CRM/Utils/Mail/EmailProcessorTest.php index b675125b75..e0468acf30 100644 --- a/tests/phpunit/CRM/Utils/Mail/EmailProcessorTest.php +++ b/tests/phpunit/CRM/Utils/Mail/EmailProcessorTest.php @@ -34,7 +34,7 @@ class CRM_Utils_Mail_EmailProcessorTest extends CiviUnitTestCase { ]); } - public function tearDown() { + public function tearDown(): void { CRM_Utils_File::cleanDir(__DIR__ . '/data/mail'); parent::tearDown(); $this->quickCleanup([ diff --git a/tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php b/tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php index 423aa36525..0e3e7c7009 100644 --- a/tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php +++ b/tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php @@ -12,7 +12,7 @@ class CRM_Utils_Migrate_ImportExportTest extends CiviUnitTestCase { parent::setUp(); } - public function tearDown() { + public function tearDown(): void { $tablesToTruncate = [ 'civicrm_custom_group', 'civicrm_custom_field', diff --git a/tests/phpunit/CRM/Utils/ZipTest.php b/tests/phpunit/CRM/Utils/ZipTest.php index b32d64e5bd..eb41fbfb77 100644 --- a/tests/phpunit/CRM/Utils/ZipTest.php +++ b/tests/phpunit/CRM/Utils/ZipTest.php @@ -20,7 +20,7 @@ class CRM_Utils_ZipTest extends CiviUnitTestCase { $this->file = FALSE; } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if ($this->file) { unlink($this->file); -- 2.25.1