[PHPunit8] cleanup on tearDown functions
authoreileen <emcnaughton@wikimedia.org>
Thu, 25 Mar 2021 09:58:22 +0000 (22:58 +1300)
committereileen <emcnaughton@wikimedia.org>
Sat, 27 Mar 2021 02:46:33 +0000 (15:46 +1300)
68 files changed:
tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php
tests/phpunit/CRM/Contact/Form/Task/DeleteTest.php
tests/phpunit/CRM/Contact/Form/Task/EmailCommonTest.php
tests/phpunit/CRM/Contact/Form/Task/PrintDocumentTest.php
tests/phpunit/CRM/Contact/Form/Task/PrintMailingLabelTest.php
tests/phpunit/CRM/Contact/Form/Task/SMSCommonTest.php
tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php
tests/phpunit/CRM/Contact/Page/AjaxTest.php
tests/phpunit/CRM/Contact/Page/DedupeExceptionTest.php
tests/phpunit/CRM/Contact/Page/View/NoteTest.php
tests/phpunit/CRM/Contact/Page/View/UserDashBoardTest.php
tests/phpunit/CRM/Contact/Page/View/UserDashboard/GroupContactTest.php
tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php
tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php
tests/phpunit/CRM/Contribute/Form/ContributionTest.php
tests/phpunit/CRM/Contribute/Form/SearchTest.php
tests/phpunit/CRM/Contribute/Page/AjaxTest.php
tests/phpunit/CRM/Core/BAO/AddressTest.php
tests/phpunit/CRM/Core/BAO/CustomGroupTest.php
tests/phpunit/CRM/Core/BAO/CustomValueTableMultipleTest.php
tests/phpunit/CRM/Core/BAO/CustomValueTableSetGetTest.php
tests/phpunit/CRM/Core/BAO/CustomValueTableTest.php
tests/phpunit/CRM/Core/BAO/EmailTest.php
tests/phpunit/CRM/Core/BAO/FinancialTrxnTest.php
tests/phpunit/CRM/Core/BAO/IMTest.php
tests/phpunit/CRM/Core/BAO/LocationTest.php
tests/phpunit/CRM/Core/BAO/NavigationTest.php
tests/phpunit/CRM/Core/BAO/OptionGroupTest.php
tests/phpunit/CRM/Core/BAO/OptionValueTest.php
tests/phpunit/CRM/Core/BAO/PhoneTest.php
tests/phpunit/CRM/Core/BAO/PreferencesTest.php
tests/phpunit/CRM/Core/BAO/SettingTest.php
tests/phpunit/CRM/Core/BAO/UFFieldTest.php
tests/phpunit/CRM/Core/CommunityMessagesTest.php
tests/phpunit/CRM/Core/Config/MailerTest.php
tests/phpunit/CRM/Core/ErrorTest.php
tests/phpunit/CRM/Core/FieldOptionsTest.php
tests/phpunit/CRM/Core/I18n/SchemaTest.php
tests/phpunit/CRM/Core/JobManagerTest.php
tests/phpunit/CRM/Core/ManagedEntitiesTest.php
tests/phpunit/CRM/Core/OptionGroupTest.php
tests/phpunit/CRM/Core/Page/HookTest.php
tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php
tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php
tests/phpunit/CRM/Core/Payment/BaseIPNTest.php
tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php
tests/phpunit/CRM/Core/Payment/PaypalProTest.php
tests/phpunit/CRM/Core/Payment/PaypalStdTest.php
tests/phpunit/CRM/Core/PseudoConstantTest.php
tests/phpunit/CRM/Core/RegionTest.php
tests/phpunit/CRM/Core/SessionTest.php
tests/phpunit/CRM/Core/Smarty/plugins/CrmMoneyTest.php
tests/phpunit/CRM/Core/Smarty/plugins/CrmScopeTest.php
tests/phpunit/CRM/Core/TransactionTest.php
tests/phpunit/CRM/Custom/Form/FieldTest.php
tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php
tests/phpunit/CRM/Event/BAO/ChangeFeeSelectionTest.php
tests/phpunit/CRM/Event/BAO/EventPermissionsTest.php
tests/phpunit/CRM/Event/BAO/ParticipantTest.php
tests/phpunit/CRM/Event/BAO/QueryTest.php
tests/phpunit/CRM/Event/Form/ParticipantTest.php
tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php
tests/phpunit/CRM/Event/Form/SearchTest.php
tests/phpunit/CRM/Extension/InfoTest.php
tests/phpunit/CRM/Extension/Manager/PaymentTest.php
tests/phpunit/CRM/Extension/Manager/SearchTest.php
tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php
tests/phpunit/CRM/Logging/LoggingTest.php

index 82506da86eec49eb077755f4e9954e158cf27aad..69bfc6a5ce4754fac77e74d9ecc6d18e671a9327 100644 (file)
@@ -19,15 +19,6 @@ class CRM_Contact_BAO_SavedSearchTest extends CiviUnitTestCase {
 
   use CRMTraits_Custom_CustomDataTrait;
 
-  /**
-   * Sets up the fixture, for example, opens a network connection.
-   *
-   * This method is called before a test is executed.
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Tears down the fixture, for example, closes a network connection.
    *
index 1dca40edfa9c89cc942f7c946a6cf56e086581d0..07e48e9cf18f3d1a2e0916fdb7ee5f490096bdce 100644 (file)
@@ -20,7 +20,7 @@ class CRM_Contact_Form_Task_DeleteTest extends CiviUnitTestCase {
    */
   protected $deleted_contact_id;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->deleted_contact_id = $this->individualCreate([
       'first_name' => 'Delete',
index 1533229d38e7bf20d0fbb48241a694459897b441..30e498db1bfe0a4ff545b0b9c2da6b9d605115f6 100644 (file)
@@ -22,7 +22,7 @@ class CRM_Contact_Form_Task_EmailCommonTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->_contactIds = [
       $this->individualCreate(['first_name' => 'Antonia', 'last_name' => 'D`souza']),
index b8a1e274ef51eba30d7d25c6a876659022d4d8ec..6bc73a832323e7b4ae9a0a92cbf3b2f34a4e7159 100644 (file)
@@ -19,7 +19,7 @@ class CRM_Contact_Form_Task_PrintDocumentTest extends CiviUnitTestCase {
 
   protected $_contactIds = NULL;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->_contactIds = [
       $this->individualCreate(['first_name' => 'Antonia', 'last_name' => 'D`souza']),
index 414fc6bf7bf91c8d53553469013f3aca81aa6de3..ec01cae8b1874e39e8ed25444269b298abf82f93 100644 (file)
@@ -17,7 +17,7 @@ class CRM_Contact_Form_Task_PrintMailingLabelTest extends CiviUnitTestCase {
 
   protected $_contactIds;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->_contactIds = [
       $this->individualCreate(['first_name' => 'Antonia', 'last_name' => 'D`souza']),
index edf9058b0527ffda659eea06cc833818b9721e71..d475141f05b4bd7307eeb9833200290acd8afb4d 100644 (file)
@@ -22,7 +22,7 @@ class CRM_Contact_Form_Task_SMSCommonTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $mobile_type_id = CRM_Core_PseudoConstant::getKey('CRM_Core_DAO_Phone', 'phone_type_id', 'Mobile');
     $phone_type_id = CRM_Core_PseudoConstant::getKey('CRM_Core_DAO_Phone', 'phone_type_id', 'Phone');
index 1378e4f6bd0a33a264a5fff91bf6b55ee7afc374..7417b45df6630fb06d2abba50efc862213d98e2e 100644 (file)
@@ -30,13 +30,6 @@ class CRM_Contact_Import_Parser_ContactTest extends CiviUnitTestCase {
    */
   protected $entity = 'Contact';
 
-  /**
-   * Setup function.
-   */
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Tear down after test.
    *
index e7e700ac228fea8b2d34750450a339ec46f6731a..6c6ce05fc05d5f5d349b16e72f18f322e9c2875b 100644 (file)
@@ -14,7 +14,7 @@ class CRM_Contact_Page_AjaxTest extends CiviUnitTestCase {
    */
   protected $originalRequest = [];
 
-  public function setUp() {
+  public function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
     $this->originalRequest = $_REQUEST;
index 537a4ed163182c05c1c83aa5859fd2455c33c65e..1e9fd053e661573ed4c94e81d8c6373836257ee1 100644 (file)
  */
 class CRM_Contact_Page_DedupeExceptionTest extends CiviUnitTestCase {
 
-  /**
-   * Sets up the fixture, for example, opens a network connection.
-   * This method is called before a test is executed.
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
-  /**
-   * Tears down the fixture, for example, closes a network connection.
-   *
-   * This method is called after a test is executed.
-   */
-  protected function tearDown(): void {
-    parent::tearDown();
-  }
-
   public function testGetDedupeExceptions() {
     $contact1      = $this->individualCreate();
     $contact2      = $this->individualCreate();
index 3ce4e7ee1a47a5aa5712d2ca5196a962f89e0a1b..c8bb6bc5ff312d7338d37c77a73e0aa04ebbabf8 100644 (file)
  */
 class CRM_Contact_Page_View_NoteTest extends CiviUnitTestCase {
 
-  /**
-   * Sets up the fixture, for example, opens a network connection.
-   * This method is called before a test is executed.
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
-  /**
-   * Tears down the fixture, for example, closes a network connection.
-   *
-   * This method is called after a test is executed.
-   */
-  protected function tearDown(): void {
-    parent::tearDown();
-  }
-
   public function testNoContactIdNote() {
     $contactId = $this->individualCreate();
     foreach ([1, 2, 3, 4, 5] as $noteID) {
index dc5e8260fdcce24c17c372024c261b41612ca7cc..9d0abd24333ae482c17364724527be48f148636b 100644 (file)
@@ -36,7 +36,7 @@ class CRM_Contact_Page_View_UserDashBoardTest extends CiviUnitTestCase {
   /**
    * Prepare for test
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->contactID = $this->createLoggedInUser();
     $this->listenForPageContent();
index 0132c809256838c6d688deaf4e87ee496ec9acb7..8ecacf19085c159fa120ad30900b5476f7808dd8 100644 (file)
  */
 class CRM_Contact_Page_View_UserDashboard_GroupContactTest extends CiviUnitTestCase {
 
-  /**
-   * Sets up the fixture, for example, opens a network connection.
-   * This method is called before a test is executed.
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
-  /**
-   * Tears down the fixture, for example, closes a network connection.
-   *
-   * This method is called after a test is executed.
-   */
-  protected function tearDown(): void {
-    parent::tearDown();
-  }
-
   /**
    * Test that the list of the contact's joined groups, on the Contact Dashboard,
    * contains the correct groups.
index e6d705aa91271acb714aea920b321405eeaf7c82..229317008af25ef68616d713f4d82ff0e9f9b294 100644 (file)
@@ -73,7 +73,7 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase {
    * @throws \CRM_Core_Exception
    * @throws \CiviCRM_API3_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->createLoggedInUser();
 
index 08df74f310da108167c2957421aab16871bc760c..8bd9015a1d2281946c931b25913758d8fabc5e34 100644 (file)
@@ -16,7 +16,7 @@
  */
 class CRM_Contribute_Form_ContributionPageTranslationTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_financialTypeID = 1;
     $this->enableMultilingual();
index 3d66b71ec71350175eed6acba3f5be002ae0757b..b8b4fdee762465ef5a9baa2b01cfa5dfbaefca72 100644 (file)
@@ -76,7 +76,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase {
    * @throws \CRM_Core_Exception
    * @throws \CiviCRM_API3_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     $this->_apiversion = 3;
     parent::setUp();
     $this->_userId = $this->createLoggedInUser();
index dd1291a7e2850edaff7071cec758f5c822f67fd3..efcf948ef26372c9584ba6589c778f5d74bc211e 100644 (file)
@@ -23,7 +23,7 @@ class CRM_Contribute_Form_SearchTest extends CiviUnitTestCase {
   protected $_individual;
   protected $_tablesToTruncate = ['civicrm_contribution', 'civicrm_line_item'];
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_individual = $this->individualCreate();
     $this->ids['Contact']['contactID1'] = $this->individualCreate([], 1);
index 8f75accb32a3f7d92d7932c261b1cac9a50282f7..a02caed346b400ea7fed33011d0a0e5a5e6969f9 100644 (file)
@@ -17,7 +17,7 @@ class CRM_Contribute_Page_AjaxTest extends CiviUnitTestCase {
 
   protected $_params = [];
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->_fields = ['amount', 'sct_label'];
index 5dbf73569a161e7e5e162ed152c61f3c6efe48f9..9e83ad065fdb319c804891d923d1b0a729cc8903 100644 (file)
@@ -17,7 +17,7 @@ class CRM_Core_BAO_AddressTest extends CiviUnitTestCase {
 
   use CRMTraits_Custom_CustomDataTrait;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->quickCleanup(['civicrm_contact', 'civicrm_address']);
index 7ca1f454c376d8e076270a40784aeb9e3c8cd2ed..6fe01558763d6fad1799b202e4721877e23a1325 100644 (file)
  */
 class CRM_Core_BAO_CustomGroupTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Test getTree().
    */
index bd60364d02529da24cd363ef713da1599b7261af..21a283af9af724425e8934f96f1e63abdf263ef6 100644 (file)
@@ -6,11 +6,7 @@
  */
 class CRM_Core_BAO_CustomValueTableMultipleTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
-  public function testCustomGroupMultipleSingle() {
+  public function testCustomGroupMultipleSingle(): void {
     $contactID = $this->individualCreate();
     $customGroup = $this->customGroupCreate(['is_multiple' => 1]);
     $fields = [
index cd04a2e05ac4cb8d6252b91b8011bdb576d1788a..ace9d63b428045eafa604d9eb05ea84046da4a0e 100644 (file)
@@ -6,10 +6,6 @@
  */
 class CRM_Core_BAO_CustomValueTableSetGetTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Test setValues() and GetValues() methods with custom Date field
    *
index a4d51bdc0feedd270cf232fba0e67d50e96382b6..c27ac83d878373c092ffbf304e2b7e52e72a28d9 100644 (file)
@@ -6,10 +6,6 @@
  */
 class CRM_Core_BAO_CustomValueTableTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Test store function for country.
    */
index 3c0f4f61829ab3dcb7bdd0ae27216e0b12012389..2647007c64ff1df85f522f0e78086020cca5f6fb 100644 (file)
@@ -11,7 +11,7 @@ class CRM_Core_BAO_EmailTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->quickCleanup(['civicrm_contact', 'civicrm_email']);
   }
index 3c414a6315b46635dbdac03f3aa87ebde6f7f70f..178a46dba5b174b663da4218eb56f4e6e709b812 100644 (file)
  */
 class CRM_Core_BAO_FinancialTrxnTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Check method create().
    *
index 5847ab1b5de2f06b8ecffda9a653132612646eef..9b56f1568f33404f2003aa98630582aeca1d1eb4 100644 (file)
@@ -8,10 +8,6 @@ use Civi\Api4\IM;
  */
 class CRM_Core_BAO_IMTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Create() method (create and update modes)
    */
index 26cceaa8f62efd808a3e61e0a8cda897bd7190b8..292d398a367571daf64abf4f8ad733a4949a2a58 100644 (file)
@@ -21,7 +21,7 @@
  */
 class CRM_Core_BAO_LocationTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->quickCleanup([
index 5b16491b1712800949d05934e5e04635f27ec633..86eb65174451bd631b34c41353dd159d6684e87c 100644 (file)
@@ -11,7 +11,7 @@ class CRM_Core_BAO_NavigationTest extends CiviUnitTestCase {
    *
    * Here we ensure we are starting from a default report navigation.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     CRM_Core_BAO_Navigation::rebuildReportsNavigation(CRM_Core_Config::domainID());
   }
index ee2d706b81410beb5b8332913fff1043faa5a7c8..ef9d7d5d52527e87423e192bd84e50a03c887b93 100644 (file)
@@ -21,7 +21,7 @@ class CRM_Core_BAO_OptionGroupTest extends CiviUnitTestCase {
   /**
    * Test setup for every test.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
   }
index ab81de61dee6ffaa2a22c78fc27bfb19f6677fde..2123167af9355840f0fb8b7145ff282dc38f4344 100644 (file)
@@ -21,7 +21,7 @@ class CRM_Core_BAO_OptionValueTest extends CiviUnitTestCase {
   /**
    * Test setup for every test.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
   }
index bd6beca1e7ab5f0301a63c9ce6d17d5370c2bd9e..8f0c37d9aa2dfbd6ea9c918601d440e395b1f2a8 100644 (file)
  */
 class CRM_Core_BAO_PhoneTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Add() method (create and update modes)
    */
index 0e804e37a2796c12c5ec6e2c4692d0cc9f2b177f..56ed1cf814f442b76689ef0ac8c20369d8980191 100644 (file)
  */
 class CRM_Core_BAO_PreferencesTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   public function testValueOptions() {
 
     $addressOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
index 27e3820238dd8c76efe85766251be3c1c708a4d7..33162f5b5ecbca7c69c2e3c519666748263ad2fc 100644 (file)
@@ -21,7 +21,7 @@ class CRM_Core_BAO_SettingTest extends CiviUnitTestCase {
    */
   private $origSetting;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     global $civicrm_setting;
     $this->origSetting = $civicrm_setting;
index 1cafb95c0e96248d06401da29f42a4022521d919..61814f004ec6a5c93a91343b68cee284a2d38a3b 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Core_BAO_UFFieldTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->quickCleanup(['civicrm_uf_group', 'civicrm_uf_field']);
index 8edeed810e66bf2b2f6c5020dbeef933b8c5e2af..58af475f177cff44fe762977b1bcd5ccd455dd16 100644 (file)
@@ -123,7 +123,7 @@ class CRM_Core_CommunityMessagesTest extends CiviUnitTestCase {
     return self::$webResponses;
   }
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->cache = new CRM_Utils_Cache_Arraycache([]);
     self::initWebResponses();
index 43c819117ce5c5e6a61c0ab5969129c4f7443358..9f24e4ae326eb9610cd388ac602da542bccaafc8 100644 (file)
@@ -30,7 +30,7 @@ class CRM_Core_Config_MailerTest extends CiviUnitTestCase {
    */
   public $calls;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->calls = [
       'civicrm_alterMailer' => 0,
       'send' => 0,
index c7444702132a93b005f77296c9401f33f6ae348b..9b79e319f00dbd7c341008866dd78a738f9999c5 100644 (file)
@@ -15,7 +15,7 @@
  */
 class CRM_Core_ErrorTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $config = CRM_Core_Config::singleton();
     $this->oldConfigAndLogDir = $config->configAndLogDir;
index f8d4c4009e6efa1624000fb5520a62680bb15571..32b80f46fbfc704464180aaf15e56bce3177de4b 100644 (file)
@@ -30,7 +30,7 @@ class CRM_Core_FieldOptionsTest extends CiviUnitTestCase {
    */
   public $targetField;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     CRM_Utils_Hook::singleton()->setHook('civicrm_fieldOptions', [$this, 'hook_civicrm_fieldOptions']);
   }
index d7d7b8c5cdee7f6643561a6e4d18ed31ceaea0fb..aea4383b166d306818cb2326f4cf1c4f93fa97c6 100644 (file)
@@ -26,7 +26,7 @@ class CRM_Core_I18n_SchemaTest extends CiviUnitTestCase {
     return $tables;
   }
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
   }
 
index f2d8077b5dd8e4e4dc735536201fc87e2ecc8839..d8f910e836a5631edaebce6e8527cf7a7f526cfb 100644 (file)
  */
 class CRM_Core_JobManagerTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   public function testHookCron() {
     $hook = $this->getMockBuilder(stdClass::class)
       ->setMethods(['civicrm_cron'])
index 8468b8fae2c54adc7644cb680cc545148f3ea53d..2a0b640efa239e168127fee4a4a7fd2602569dbc 100644 (file)
@@ -22,7 +22,7 @@ class CRM_Core_ManagedEntitiesTest extends CiviUnitTestCase {
 
   protected $fixtures;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
     $this->modules = [
index 81778ef2d7a7c2b52f8a0003594383683db6388b..5c3295b62642af41af4732534b95550b514c6f9c 100644 (file)
@@ -18,7 +18,7 @@ class CRM_Core_OptionGroupTest extends CiviUnitTestCase {
   /**
    * Test setup for every test.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
   }
 
index d6168763a139633f118ef982914fe66a49aa986a..5c0e548e4edd6aa2588a09b046685376118d50ac 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Core_Page_HookTest extends CiviUnitTestCase {
   /**
    * Set up the list of pages to evaluate by going through the menu.
    */
-  public function setUp() {
+  public function setUp(): void {
     // Get all of the menu items in CiviCRM.
     $items = CRM_Core_Menu::items(TRUE);
     // Check if they extend the class we care about; test if needed.
index ed1bfcf702cb8cb9b415537865199a16605e7028..1c074d9f5ed18af4a97e984857a4c8d060a3ba7e 100644 (file)
@@ -22,7 +22,7 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_paymentProcessorID = $this->paymentProcessorAuthorizeNetCreate(['is_test' => 0]);
     $this->_contactID = $this->individualCreate();
index 94ec92778f36eb7e4359b384ce63b2de8c04edf1..488ee868d097e465261a2dd3aed5ae94ac00a857 100644 (file)
@@ -19,7 +19,7 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
 
   use CRM_Core_Payment_AuthorizeNetTrait;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_paymentProcessorID = $this->paymentProcessorAuthorizeNetCreate();
 
index 6ea7622e3fb87a01b0dca2553f682d426dcdd1bb..48c4997556614eeaa0a09e5bc101f7e14956d778 100644 (file)
@@ -61,7 +61,7 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase {
   /**
    * Setup function.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_processorId = $this->paymentProcessorAuthorizeNetCreate(['is_test' => 0]);
     $this->input = $this->ids = $this->objects = [];
index d5ee6ce62132294c8a8d393b20ff9fcea232a19d..57d9e4d209cfd7ed52e2275b284fe4073ebb8db4 100644 (file)
@@ -31,7 +31,7 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase {
   /**
    * Set up function.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_paymentProcessorID = $this->paymentProcessorCreate(['is_test' => 0]);
     $this->_contactID = $this->individualCreate();
index f4be1f12752b4a3a611954991658c34d2740190f..94e3196ff533febdc4a1d0f03a377a2e27a2a654 100644 (file)
@@ -20,7 +20,7 @@ class CRM_Core_Payment_PaypalProTest extends CiviUnitTestCase {
   /**
    * @throws \CiviCRM_API3_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->createPaypalProProcessor();
 
index 7b9335590a5f1f1cea9cb0c245a71e963cc4c97b..1f2689bace2a670d79c9e7bf1a480d10b37956d9 100644 (file)
@@ -23,7 +23,7 @@ class CRM_Core_Payment_PaypalStdTest extends CiviUnitTestCase {
   /**
    * @throws \CiviCRM_API3_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $processorID = $this->processorCreate([
       'payment_processor_type_id' => 'PayPal_Standard',
index 36a1dc33b73bb98b1d3ba0f35e2c31300d6fc0ae..ff58d664121bfaa77f4c78c153b1c39e3482d478 100644 (file)
@@ -15,7 +15,7 @@
  */
 class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->loadAllFixtures();
index 9f1d628317004a2ec7c5405c42ee3943799b7294..e11dc213c5ecf6faec6c9ac5f3834aa6cda0fa29 100644 (file)
@@ -7,7 +7,7 @@
  */
 class CRM_Core_RegionTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     // Templates injected into regions should normally be file names, but for unit-testing it's handy to use "string:" notation
index 16588876aa7417e41b7c301dcf8bd39717c8bb0b..60c165417d9e9131130af0fbb996ef4c777f5483 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Core_SessionTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     CRM_Core_Smarty::singleton()->clearTemplateVars();
   }
 
index e2e2e6a40a9242deadd8e539aaa83241d7f3cad8..c170adcb552259abc0921dabad71c7e99b6ed291 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Core_Smarty_plugins_CrmMoneyTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     require_once 'CRM/Core/Smarty.php';
 
index e5da6d0ec3246b724dc7e0f43de78a081b8e8cab..40184d79d12aa21a9ae990ebd58845801dc9fec0 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Core_Smarty_plugins_CrmScopeTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     require_once 'CRM/Core/Smarty.php';
 
index 069980a5337703ceba538e0868631532c91ad652..de41e640c3cde563358fee299835cd53f5164bc7 100644 (file)
@@ -19,7 +19,7 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase {
    */
   private $cids;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->quickCleanup(['civicrm_contact', 'civicrm_activity']);
     $this->callbackLog = [];
index c694ea6d57ae6ef8a25d7244f14fa4cd934d7227..a40d2038c1f409ba87e1047c16e2939695f1b6e8 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Custom_Form_FieldTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
   }
 
index 4c172c23fb8b1dd438996756e56ed8e8fd7d0cc9..ae19b6c2bd923e0900f0d35cf20c0a89d02594c7 100644 (file)
@@ -28,7 +28,7 @@ class CRM_Event_BAO_AdditionalPaymentTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->contactID = $this->individualCreate();
     $event = $this->eventCreate();
index a92d7cd7f58d1a36cd13d00bf702efaaff941dce..85524bd91bb58a68dddfdf7fe7a8e37298e1b74e 100644 (file)
@@ -63,7 +63,7 @@ class CRM_Event_BAO_ChangeFeeSelectionTest extends CiviUnitTestCase {
    * @throws \CRM_Core_Exception
    * @throws \CiviCRM_API3_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_contactId = $this->individualCreate();
     $event = $this->eventCreate(['is_monetary' => 1]);
index 3fc3e5f2554d216a9714a707e019bff3c3d1d684..8179347aa61c7b7cd7ad2680f94404856bf8ae70 100644 (file)
@@ -17,7 +17,7 @@ class CRM_Event_BAO_EventPermissionsTest extends CiviUnitTestCase {
 
   use CRMTraits_ACL_PermissionTrait;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_contactId = $this->createLoggedInUser();
     $this->createOwnEvent();
index c274e941c6cf1afacac34deb7b73e1562041aaac..42f9a3b7a8dffad7cef4915e0933d3c9f0c33531 100644 (file)
@@ -16,7 +16,7 @@
  */
 class CRM_Event_BAO_ParticipantTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_contactId = $this->individualCreate();
     $event = $this->eventCreate();
index 84c31e0eaf0a53199c390957774c4563279d8838..0e1e087188b412bbe7d138950f3040535deddeff 100644 (file)
@@ -5,7 +5,7 @@
  */
 class CRM_Event_BAO_QueryTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
   }
 
index be2c61ffca0eabb9ec400ac168dc0b258465287e..d817ddeb11455a6dc3a304b11e3b0610d9421cc6 100644 (file)
@@ -15,7 +15,7 @@ class CRM_Event_Form_ParticipantTest extends CiviUnitTestCase {
    */
   protected $fromEmailAddressOptions = [];
 
-  public function setUp() {
+  public function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
   }
index 0411a6da6b2a3063b0a1063890ea78bdf81b5a51..6267e1e8515078eee50082aa272ea0f752182ac7 100644 (file)
@@ -10,7 +10,7 @@ class CRM_Event_Form_Registration_ConfirmTest extends CiviUnitTestCase {
 
   use CRMTraits_Profile_ProfileTrait;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
   }
index 7899cf2ff1fdd27c74c1d264f923df2e23ec18da..3685cb9dc185d165cc995ecad8cea4b4eea26931 100644 (file)
@@ -5,7 +5,7 @@
  */
 class CRM_Event_Form_SearchTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->individualID = $this->individualCreate();
     $this->event = $this->eventCreate();
index 75e082a73bdd9bd7e78c970c070bac9e79d6e2e5..73e577fad86d5aa0c9bf7bf70344d36a93b33cdc 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Extension_InfoTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->file = NULL;
   }
index d6bffc10e002b5296f28245c0d4a7acda436f15d..79d71fdd24f074e9bd01a55486932df23d90ac13 100644 (file)
@@ -15,7 +15,7 @@
  */
 class CRM_Extension_Manager_PaymentTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     if (class_exists('test_extension_manager_paymenttest')) {
       test_extension_manager_paymenttest::$counts = [];
index ee4ec46433983366eedee6304807c64c9f5dff6a..d37ada35f6089f4dd67c16c6d1443951e9a8aa69 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Extension_Manager_SearchTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     //if (class_exists('test_extension_manager_searchtest')) {
     //  test_extension_manager_searchtest::$counts = array();
index e673b00c0ae0b804e87b7dc0e30bb670241a7232..208f5ea27466b192e8d1b3eaa3c0fc5873811ec5 100644 (file)
@@ -18,7 +18,7 @@ use Civi\Api4\FinancialType;
  */
 class CRM_Financial_BAO_FinancialAccountTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
     $this->organizationCreate();
index c2623dd7e113223c1f12c038a744898e42693265..cd1d64c7505471fa861e297d4db787763ae419b3 100644 (file)
@@ -6,10 +6,6 @@
  */
 class CRM_Logging_LoggingTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   public function tearDown(): void {
     CRM_Core_I18n_Schema::makeSinglelingual('en_US');
     $logging = new CRM_Logging_Schema();