PHPUNIT 8 - add void to setup functions
authoreileen <emcnaughton@wikimedia.org>
Sat, 27 Mar 2021 19:22:16 +0000 (08:22 +1300)
committereileen <emcnaughton@wikimedia.org>
Sat, 27 Mar 2021 19:22:16 +0000 (08:22 +1300)
65 files changed:
tests/phpunit/CRM/Financial/BAO/FinancialTypeAccountTest.php
tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php
tests/phpunit/CRM/Group/Page/AjaxTest.php
tests/phpunit/CRM/Logging/SchemaTest.php
tests/phpunit/CRM/Mailing/BAO/SpoolTest.php
tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php
tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php
tests/phpunit/CRM/Mailing/MailStoreTest.php
tests/phpunit/CRM/Mailing/MailingSystemTest.php
tests/phpunit/CRM/Mailing/TokensTest.php
tests/phpunit/CRM/Member/BAO/MembershipLogTest.php
tests/phpunit/CRM/Member/BAO/MembershipTest.php
tests/phpunit/CRM/Member/BAO/MembershipTypeTest.php
tests/phpunit/CRM/Member/BAO/QueryTest.php
tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php
tests/phpunit/CRM/Pledge/Form/SearchTest.php
tests/phpunit/CRM/Price/Form/FieldTest.php
tests/phpunit/CRM/Price/Form/OptionTest.php
tests/phpunit/CRM/Queue/Queue/SqlTest.php
tests/phpunit/CRM/Queue/QueueTest.php
tests/phpunit/CRM/Queue/RunnerTest.php
tests/phpunit/CRM/Report/Form/ActivityTest.php
tests/phpunit/CRM/Report/Form/Contribute/DetailTest.php
tests/phpunit/CRM/Report/Form/Member/DetailTest.php
tests/phpunit/CRM/Report/Form/TestCaseTest.php
tests/phpunit/CRM/SMS/BAO/ProviderTest.php
tests/phpunit/CRM/SMS/PreviewTest.php
tests/phpunit/CRM/SMS/ProviderTest.php
tests/phpunit/CRM/Utils/API/MatchOptionTest.php
tests/phpunit/CRM/Utils/API/ReloadOptionTest.php
tests/phpunit/CRM/Utils/AutoCleanTest.php
tests/phpunit/CRM/Utils/EnglishNumberTest.php
tests/phpunit/CRM/Utils/HookTest.php
tests/phpunit/CRM/Utils/HttpClientTest.php
tests/phpunit/CRM/Utils/Mail/EmailProcessorInboundTest.php
tests/phpunit/CRM/Utils/Mail/EmailProcessorTest.php
tests/phpunit/CRM/Utils/MoneyTest.php
tests/phpunit/CRM/Utils/ZipTest.php
tests/phpunit/Civi/API/Event/PrepareEventTest.php
tests/phpunit/Civi/API/KernelTest.php
tests/phpunit/Civi/ActionSchedule/AbstractMappingTest.php
tests/phpunit/Civi/Angular/LoaderTest.php
tests/phpunit/Civi/Angular/ManagerTest.php
tests/phpunit/Civi/Angular/PartialSyntaxTest.php
tests/phpunit/Civi/Core/CiviFacadeTest.php
tests/phpunit/Civi/Core/ResolverTest.php
tests/phpunit/Civi/Core/SettingsBagTest.php
tests/phpunit/Civi/Core/SettingsManagerTest.php
tests/phpunit/Civi/Core/ThemesTest.php
tests/phpunit/Civi/Crypto/CryptoJwtTest.php
tests/phpunit/Civi/Crypto/CryptoRegistryTest.php
tests/phpunit/Civi/Crypto/CryptoTokenTest.php
tests/phpunit/Civi/Token/TokenProcessorTest.php
tests/phpunit/E2E/Cache/TwoInstancesTest.php
tests/phpunit/E2E/Core/AssetBuilderTest.php
tests/phpunit/E2E/Core/PrevNextTest.php
tests/phpunit/E2E/Extern/SoapTest.php
tests/phpunit/HelloTest.php
tests/phpunit/api/v4/Action/BaseCustomValueTest.php
tests/phpunit/api/v4/Action/CreateWithOptionGroupTest.php
tests/phpunit/api/v4/Action/ReplaceTest.php
tests/phpunit/api/v4/Entity/ConformanceTest.php
tests/phpunit/api/v4/Entity/ParticipantTest.php
tests/phpunit/api/v4/Entity/SystemRotateKeyTest.php
tests/phpunit/api/v4/Traits/OptionCleanupTrait.php

index 7ce8437099dfb3761186e0dac1baabb77c5f89a8..4bb6d3b077e47b1bb24ca2bd3bfd979158a7fd6a 100644 (file)
@@ -15,7 +15,7 @@
  */
 class CRM_Financial_BAO_FinancialTypeAccountTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->organizationCreate();
   }
index a2d0b4a451a462c8a73f8533aac90e1c65b3c539..0258437bd505b3b18cd9f4787f96e72e93be9168 100644 (file)
@@ -15,7 +15,7 @@
  */
 class CRM_Financial_BAO_FinancialTypeTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_orgContactID = $this->organizationCreate();
   }
index 5237cf2bfc5ce48235349c897d3948c175fcc15d..71931a9f4a51fff8a5ca221e367c6a63e7b846fe 100644 (file)
@@ -25,7 +25,7 @@ class CRM_Group_Page_AjaxTest extends CiviUnitTestCase {
 
   protected $_params = [];
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_params = [
       'page' => 1,
index 110c6ffcc2a01b6e7fedb46cece679e61110c5f9..e27089bfd60367073a2dd54e41261d563b8f8151 100644 (file)
@@ -8,7 +8,7 @@ class CRM_Logging_SchemaTest extends CiviUnitTestCase {
 
   protected $databaseVersion;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->databaseVersion = CRM_Utils_SQL::getDatabaseVersion();
     parent::setUp();
   }
index ae5be6bf09ce6f5cf4264bdd1e4e0cd02b3680a6..449e104b44677a9f4f7968d627d2984a95500e60 100644 (file)
@@ -14,7 +14,7 @@ class CRM_Mailing_BAO_SpoolTest extends CiviUnitTestCase {
 
   protected static $bodytext = 'Unit tests keep children safe.';
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_mut = new CiviMailUtils($this, TRUE);
   }
index f83d444e48d8c60148664c633edbef01ac617dd7..7d927cdda1b6a93631b891bfb8800b45650cff4d 100644 (file)
@@ -36,7 +36,7 @@ abstract class CRM_Mailing_BaseMailingSystemTest extends CiviUnitTestCase {
    */
   private $_mut;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->useTransaction();
     parent::setUp();
     CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0;
index c579c87d26fc79804f9769c41bb8195cd28a4cfb..fb11da8bf1c3f61ea197669e06ab89490747873d 100644 (file)
@@ -17,7 +17,7 @@ class CRM_Mailing_Form_Task_AdhocMailingTest extends CiviUnitTestCase {
   /**
    * @throws \Exception
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->_contactIds = [
       $this->individualCreate(['first_name' => 'Antonia', 'last_name' => 'D`souza']),
index e4a549ff8ca68959b596549d1b7724d97ff80904..ae164f2b1c1383e2a2863aee40f6520b180b05e0 100644 (file)
@@ -7,7 +7,7 @@ class CRM_Mailing_MailStoreTest extends \CiviUnitTestCase {
 
   protected $workDir;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
     $this->workDir = tempnam(sys_get_temp_dir(), 'mailstoretest');
index b52dcc9fccad622b66162d3b43ea36fedf1bd53d..21dc496d0982578b5c2ba26d138039b2d15e281f 100644 (file)
@@ -38,7 +38,7 @@ class CRM_Mailing_MailingSystemTest extends CRM_Mailing_BaseMailingSystemTest {
 
   private $counts;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     // If we happen to execute with flexmailer active, use BAO mode.
     // There is a parallel FlexMailerSystemTest which runs in flexmailer mode.
index c0ac6a74e85984739d1670b6a8c821e177ce8c16..4a5bdb7f4cb879f616081bde0049020b664f7c7a 100644 (file)
@@ -5,7 +5,7 @@
  */
 class CRM_Mailing_TokensTest extends \CiviUnitTestCase {
 
-  protected function setUp() {
+  protected function setUp(): void {
     $this->useTransaction();
     parent::setUp();
     $this->callAPISuccess('mail_settings', 'get',
index 541b1d0cf45f37cede11d68a6ecb6880bfd1228d..ea638a3bf71fee67fde3bcea66c7234e6704bf28 100644 (file)
@@ -63,7 +63,7 @@ class CRM_Member_BAO_MembershipLogTest extends CiviUnitTestCase {
    * @throws \CRM_Core_Exception
    * @throws \CiviCRM_API3_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $params = [
index ad5c9a1b0961f73cd98f4c12a18e501db9b64974..0358ea0d6ea06f031812f92ebe1a6c17166d0fcf 100644 (file)
@@ -19,7 +19,7 @@ class CRM_Member_BAO_MembershipTest extends CiviUnitTestCase {
   private $_membershipStatusID;
   private $_membershipTypeID;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->_contactID = $this->organizationCreate();
index 0193316765d44168fdce6ee1660d71b4b1c7e914..6af848e4db7c8396c7b804828e9bb1e677ba7f73 100644 (file)
@@ -17,7 +17,7 @@ use Civi\Api4\MembershipType;
  */
 class CRM_Member_BAO_MembershipTypeTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     //create relationship
index 98a563abf3a0e42cf467061bdc203d281db00c83..460cb6ac4d74ead3889fb59a9b7cd3defbbcc4b8 100644 (file)
@@ -11,7 +11,7 @@ class CRM_Member_BAO_QueryTest extends CiviUnitTestCase {
    *
    * Ensure CiviCase is enabled.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     CRM_Core_BAO_ConfigSetting::enableComponent('CiviCase');
   }
index 8fd040a7b464a20fa9c4c17d813906f55d57dfb4..c166ca43b7cfac0a127814ef4ae1d4fc9a5b8f60 100644 (file)
@@ -53,7 +53,7 @@ class CRM_Member_Import_Parser_MembershipTest extends CiviUnitTestCase {
    * @throws \CRM_Core_Exception
    * @throws \CiviCRM_API3_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $params = [
index 0ff0e7750ebd55e4b84f3d6b8b7192094ec8c73c..c5692825ae6cab228a5636e9ba7b77bef97b9f69 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Pledge_Form_SearchTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->individualID = $this->individualCreate();
     $this->pledgeCreate(['contact_id' => $this->individualID]);
index a7ecdafb369b7a9ffa828f96aedcc0848767e4fc..b05af373af0b5d9ddd012bb776ef255c12eafcb4 100644 (file)
@@ -8,7 +8,7 @@ class CRM_Price_Form_FieldTest extends CiviUnitTestCase {
   protected $publicFieldParams;
   protected $adminFieldParams;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->visibilityOptionsKeys = CRM_Core_PseudoConstant::get('CRM_Price_BAO_PriceFieldValue', 'visibility_id', [
index f9ac7ed7b7f5303394466ff6588ec8c783bac0ce..829d44fcae40b345d88858ad2a060d44700930ec 100644 (file)
@@ -12,7 +12,7 @@ class CRM_Price_Form_OptionTest extends CiviUnitTestCase {
 
   protected $adminValue;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->visibilityOptions = CRM_Core_PseudoConstant::get('CRM_Price_BAO_PriceFieldValue', 'visibility_id', [
index c7a4dccad490f65cb94c62177eabd9f934abb58e..6f544387b06186111dd33aadd9655b3f222f879f 100644 (file)
@@ -39,7 +39,7 @@ class CRM_Queue_Queue_SqlTest extends CiviUnitTestCase {
    * Per-provider tests
    *
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->queueService = CRM_Queue_Service::singleton(TRUE);
   }
index 8b114d402caf07217c4d5476fb9d959357d0a2fb..a79f30a717baae932fd9e65f14a1a9df7b1e76ab 100644 (file)
@@ -42,7 +42,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase {
   /**
    * Per-provider tests
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->queueService = CRM_Queue_Service::singleton(TRUE);
   }
index f8dde4382ee83ee90aa04d4de4bde7baf0899264..ed1799a5b29f6392b2bf73b0ebff129b9a296f42 100644 (file)
@@ -15,7 +15,7 @@
  */
 class CRM_Queue_RunnerTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->queueService = CRM_Queue_Service::singleton(TRUE);
     $this->queue = $this->queueService->create([
index 97848fa4e1c0801002fda26e2cbc457451e386a3..688e05a2b7f412c3ceaae702622690fb70bc4de6 100644 (file)
@@ -23,7 +23,7 @@ class CRM_Report_Form_ActivityTest extends CiviReportTestCase {
     'civicrm_contribution',
   ];
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->quickCleanup($this->_tablesToTruncate);
   }
index c384ff17f530093699c8a6aeeb0eb43d8517518b..7e1b5196386e6af774844d9ec65435b3910aed64 100644 (file)
@@ -49,7 +49,7 @@ class CRM_Report_Form_Contribute_DetailTest extends CiviReportTestCase {
     ];
   }
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->quickCleanup($this->_tablesToTruncate);
   }
index 9c7bedcc9058680a41ee7ca1f72657931d6de136..2f1755bc0c535ebc37f146f65c53b83f503d7f5a 100644 (file)
@@ -16,7 +16,7 @@
  */
 class CRM_Report_Form_Member_DetailTest extends CiviReportTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->_orgContactID = $this->organizationCreate();
index 17c6a8437924d1b471bd99cacd25a8ab1034a04b..419ce4cb16115b1a55334b4947a549ca2bc79796 100644 (file)
@@ -115,7 +115,7 @@ class CRM_Report_Form_TestCaseTest extends CiviReportTestCase {
     ];
   }
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->quickCleanup($this->_tablesToTruncate);
   }
index 105193a2909b6990d3d0ff2832c3ff077f2dd3bc..9ca1c3421742959f1a51782462b25de0cb5a1382 100644 (file)
@@ -21,7 +21,7 @@ class CRM_SMS_BAO_ProviderTest extends CiviUnitTestCase {
   /**
    * Set Up Funtion
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $option = $this->callAPISuccess('option_value', 'create', ['option_group_id' => 'sms_provider_name', 'name' => 'test_provider_name', 'label' => 'test_provider_name', 'value' => 1]);
     $this->option_value = $option['id'];
index ce45dfa728a2a0f261f389ef3e170e9f77cb36ce..fa81cecad305129b74eb7f2cd3bbe2dc58d53346 100644 (file)
@@ -10,7 +10,7 @@ class CRM_SMS_PreviewTest extends CiviUnitTestCase {
   /**
    * Set Up Function
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $option = $this->callAPISuccess('option_value', 'create', ['option_group_id' => 'sms_provider_name', 'name' => 'test_provider_name', 'label' => 'Test Provider Label', 'value' => 1]);
     $this->option_value = $option['id'];
index a1921f330b90a8208282478d0a783398785d45ad..9bf2993bb6eb2b535feeb50a7c30345a94fa81e4 100644 (file)
@@ -23,7 +23,7 @@ class CRM_SMS_ProviderTest extends CiviUnitTestCase {
   /**
    * Set Up Funtion
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $option = $this->callAPISuccess('option_value', 'create', ['option_group_id' => 'sms_provider_name', 'name' => 'test_provider_name', 'label' => 'test_provider_name', 'value' => 1]);
     $this->option_value = $option['id'];
index be36950452a1c2574b0ae9cb526c355d77a84b43..f6b610812af41a9cfce83553f0fd8cf90a2bdd10 100644 (file)
@@ -11,7 +11,7 @@ class CRM_Utils_API_MatchOptionTest extends CiviUnitTestCase {
    */
   public $noise;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->assertDBQuery(0, "SELECT count(*) FROM civicrm_contact WHERE first_name='Jeffrey' and last_name='Lebowski'");
 
index 44491e8ce0dc5411403d0e2455396873e51f6811..01ece92d7c3a357872e2435653acb42065117029 100644 (file)
@@ -11,7 +11,7 @@
  */
 class CRM_Utils_API_ReloadOptionTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     CRM_Utils_Hook_UnitTests::singleton()->setHook('civicrm_post', [$this, 'onPost']);
   }
index a48d0192bb10c0ae4014a084e2264d871c59014c..6cfc20f62d0dffbac58ac8775a0eb807481a95ac 100644 (file)
@@ -8,7 +8,7 @@ class CRM_Utils_AutoCleanTest extends CiviUnitTestCase {
 
   public $foo;
 
-  protected function setUp() {
+  protected function setUp(): void {
     $this->useTransaction();
     parent::setUp();
   }
index 24a301040c5e6221bf2a87bcd43df62bb34b08c1..eba51d29c019d8d975b0534daf62e96240481dbf 100644 (file)
@@ -7,7 +7,7 @@
  */
 class CRM_Utils_EnglishNumberTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction();
   }
index 97419e2511b353bc4b1504141733ff6f809cddfd..4ec39cce8cb36696bc7695de5236dc8bad8fb212 100644 (file)
@@ -12,7 +12,7 @@ class CRM_Utils_HookTest extends CiviUnitTestCase {
 
   public $log;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->fakeModules = [
       'hooktesta',
index 1ec1a6eadedc9fde2d3a1863b809cb6b75f925c8..599bc6d153f68f32a52f060633385c4e5f355f7b 100644 (file)
@@ -24,7 +24,7 @@ class CRM_Utils_HttpClientTest extends CiviUnitTestCase {
    */
   protected $client;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->tmpFile = $this->createTempDir() . '/example.txt';
index b845c3620fdafd754cca7c01d3c9065cd42a2aef..44355f7656aa244aac284a304bc9c28e1e65ff27 100644 (file)
@@ -13,7 +13,7 @@ class CRM_Utils_Mail_EmailProcessorInboundTest extends CiviUnitTestCase {
    */
   protected $mailSettingsId;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     CRM_Utils_File::cleanDir(__DIR__ . '/data/mail');
     mkdir(__DIR__ . '/data/mail');
index e0468acf305d715adf0fee2c647b9c3fe0c9c3f8..92500f1bd6c021009730baab00378ca476bbe154 100644 (file)
@@ -20,7 +20,7 @@ class CRM_Utils_Mail_EmailProcessorTest extends CiviUnitTestCase {
    */
   protected $contactID;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     CRM_Utils_File::cleanDir(__DIR__ . '/data/mail');
     mkdir(__DIR__ . '/data/mail');
index 8deb5818c3fe9afaa2134ed5cdefa4e1ac59f1e2..f4cb5718ee6f4772604fd4823402335322805962 100644 (file)
@@ -6,10 +6,6 @@
  */
 class CRM_Utils_MoneyTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * @dataProvider subtractCurrenciesDataProvider
    * @param string $leftOp
index eb41fbfb771a0c9ab410ea27f3b0e8817dba146b..9cb51eec2b36fb1b2a7058dbd6d801076dfe53eb 100644 (file)
@@ -15,7 +15,7 @@
  */
 class CRM_Utils_ZipTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->file = FALSE;
   }
index ce5516c98b28978861832c88f8e3fd86f9895961..1eb9b82493f250e14626df316a17af84022b000b 100644 (file)
@@ -19,7 +19,7 @@ class PrepareEventTest extends \CiviUnitTestCase {
    */
   public $kernel;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->dispatcher = new EventDispatcher();
     $this->kernel = new Kernel($this->dispatcher);
index 32ef294712ce4acf0719eb97477534b58dc272d7..0831247f7dd780a7f8cfec0f82fca9923c188606 100644 (file)
@@ -24,7 +24,7 @@ class KernelTest extends \CiviUnitTestCase {
    */
   public $kernel;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->actualEventSequence = [];
     $this->dispatcher = new EventDispatcher();
index 79a8019d9a3a10fac8f14bfb1dacbdb2d331f381..dc9bbf1b7baf749b56a02f167e65d313bc5f2570 100644 (file)
@@ -184,7 +184,7 @@ abstract class AbstractMappingTest extends \CiviUnitTestCase {
   /**
    * Setup an empty schedule and some contacts.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->useTransaction();
 
index c6c144b6a2face448a6398a8e190f9fc132929ca..e1fe0e09484cfb6bc547b9aba28f10a41650735a 100644 (file)
@@ -19,7 +19,7 @@ class LoaderTest extends \CiviUnitTestCase {
   public static $dummy_setting_count = 0;
   public static $dummy_callback_count = 0;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->hookClass->setHook('civicrm_angularModules', [$this, 'hook_angularModules']);
     self::$dummy_setting_count = 0;
index 937a62db852cfa8f283eb0f55ce889a6865037a8..7d82c5bb1e2099c1da471315298956de373a13bc 100644 (file)
@@ -29,7 +29,7 @@ class ManagerTest extends \CiviUnitTestCase {
   /**
    * @inheritDoc
    */
-  protected function setUp() {
+  protected function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
     $this->createLoggedInUser();
index 40dacc6db4cfc4038786753276a16a3e7acaffd1..81ff60477ebdf6f53a1cb41099d2db12d233b3f5 100644 (file)
@@ -29,7 +29,7 @@ class PartialSyntaxTest extends \CiviUnitTestCase {
   /**
    * @inheritDoc
    */
-  protected function setUp() {
+  protected function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
     $this->createLoggedInUser();
index 1fcae645d3bc0e3faa87fba6d28d536348881b09..04503b7412ada585ef0224eb956c78b4185ccc08 100644 (file)
@@ -5,7 +5,7 @@ class CiviFacadeTest extends \CiviUnitTestCase {
 
   protected $origSetting;
 
-  protected function setUp() {
+  protected function setUp(): void {
     $this->origSetting = $GLOBALS['civicrm_setting'];
 
     parent::setUp();
index cecc16ca0b0aa76a43c55037f6ab98916514a384..67a7ef5da4aedded7311cc6e0915736c709d2cf2 100644 (file)
@@ -16,7 +16,7 @@ namespace Civi\Core {
     /**
      * Test setup.
      */
-    protected function setUp() {
+    protected function setUp(): void {
       // TODO: Change the autogenerated stub
       parent::setUp();
       $this->resolver = new Resolver();
index e68ac6f29e2b2e3b86db98b812a33a31554a693f..85ca76ffe82053d08e7fffcf289dc17083283910 100644 (file)
@@ -5,7 +5,7 @@ class SettingsBagTest extends \CiviUnitTestCase {
 
   protected $origSetting;
 
-  protected function setUp() {
+  protected function setUp(): void {
     $this->origSetting = $GLOBALS['civicrm_setting'];
 
     parent::setUp();
index 77b99ad115c139d26631ef9aeab3d5346000dcdc..69ea7f4a9661e571459ed7b7cb62e2e66d4f3687 100644 (file)
@@ -8,7 +8,7 @@ class SettingsManagerTest extends \CiviUnitTestCase {
   protected $mandates;
   protected $origSetting;
 
-  protected function setUp() {
+  protected function setUp(): void {
     $this->origSetting = $GLOBALS['civicrm_setting'];
 
     parent::setUp();
index f252078921a9abd28e3dfb78b840482d1e8ec105..3abb4f7d2257d69a01ac264f38a1a3c3c1c26924 100644 (file)
@@ -9,7 +9,7 @@ namespace Civi\Core;
  */
 class ThemesTest extends \CiviUnitTestCase {
 
-  protected function setUp() {
+  protected function setUp(): void {
     $this->useTransaction();
     parent::setUp();
   }
index 67611ebe39ba61e25af34ed9d150b05cc5ddf058..43711e8602c7d7293886255fc697218527ca820c 100644 (file)
@@ -22,7 +22,7 @@ class CryptoJwtTest extends \CiviUnitTestCase {
 
   use CryptoTestTrait;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     \CRM_Utils_Hook::singleton()->setHook('civicrm_crypto', [$this, 'registerExampleKeys']);
     JWT::$timestamp = NULL;
index 259c9e60abf88e78af0821672394c086da7feea2..bad98388d9389a41ee17442d8dca51d516b68f01 100644 (file)
@@ -20,7 +20,7 @@ class CryptoRegistryTest extends \CiviUnitTestCase {
 
   use CryptoTestTrait;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     \CRM_Utils_Hook::singleton()->setHook('civicrm_crypto', [$this, 'registerExampleKeys']);
   }
index ccd27dcd762fff6df30696476a4e3efc022ce1f1..c17696846d0a12d752504ddcf6d944d917d7e1ea 100644 (file)
@@ -20,7 +20,7 @@ class CryptoTokenTest extends \CiviUnitTestCase {
 
   use CryptoTestTrait;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     \CRM_Utils_Hook::singleton()->setHook('civicrm_crypto', [$this, 'registerExampleKeys']);
   }
index f4e667a166154cd9dd10c73b2c0b8845ab7e140c..cd8dba1cf23b9e44af6fc6843543740d28d42c5a 100644 (file)
@@ -18,7 +18,7 @@ class TokenProcessorTest extends \CiviUnitTestCase {
    */
   protected $counts;
 
-  protected function setUp() {
+  protected function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
     $this->dispatcher = new EventDispatcher();
index 73e9f554df594c82977b61119717b6953df7d58b..2c8760a7f24afb202fadbf1319c893babd6dd6d7 100644 (file)
@@ -26,7 +26,7 @@ class E2E_Cache_TwoInstancesTest extends CiviEndToEndTestCase {
    */
   protected $b;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->a = $this->b = NULL;
   }
index aa282d6b663ab1b51818bf6d79b8025a09a19f17..90faf2d6c3908e4bb9b73642981d312ec9020aa6 100644 (file)
@@ -17,7 +17,7 @@ class AssetBuilderTest extends \CiviEndToEndTestCase {
   /**
    * @inheritDoc
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     \Civi::service('asset_builder')->clear();
index fb598f6e7eb3ab809b51c764fe4ccf2a448d137f..13cf2f170305bbf7ffa31178bb7bd0cad0b88529 100644 (file)
@@ -27,7 +27,7 @@ class PrevNextTest extends \CiviEndToEndTestCase {
    */
   protected $prevNext;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->prevNext = \Civi::service('prevnext');
     $this->cacheKey = 'PrevNextTest_' . \CRM_Utils_String::createRandom(16, \CRM_Utils_String::ALPHANUMERIC);
index 530839337de52ef5221b06a20aed9bfe76232bdc..63a8c5355300c837a423f06f3371f13d264ccc58 100644 (file)
@@ -30,7 +30,7 @@ class E2E_Extern_SoapTest extends CiviEndToEndTestCase {
    */
   public $adminPass;
 
-  public function setUp() {
+  public function setUp(): void {
     CRM_Core_Config::singleton(1, 1);
 
     global $_CV;
index 172d62f358375b650f5c2cb01f16f7e6afbf99f2..63c5eb344b64e07a89c8fc41ceba1fab83bf97ac 100644 (file)
@@ -38,7 +38,7 @@ class HelloTest extends PHPUnit\Framework\TestCase {
    * this function is defined in PHPUnit_TestCase and overwritten
    * here
    */
-  public function setUp() {
+  public function setUp(): void {
     // create a new instance of String with the
     // string 'abc'
     $this->abc = 'hello';
index fb58558be1e8d2a2f39d8ecf40a3575a237f1935..29adc87e373db703dd4128207872323b3e4a22d2 100644 (file)
@@ -32,7 +32,7 @@ abstract class BaseCustomValueTest extends UnitTestCase {
   /**
    * Set up baseline for testing
    */
-  public function setUp() {
+  public function setUp(): void {
     $this->setUpOptionCleanup();
     $cleanup_params = [
       'tablesToTruncate' => [
index 56cc775e3578928b37c640c7cd330f460aac0fca..11030b8f6e4ad6fae0756fb355e463ad05f93463 100644 (file)
@@ -31,7 +31,7 @@ class CreateWithOptionGroupTest extends BaseCustomValueTest {
   /**
    * Remove the custom tables
    */
-  public function setUp() {
+  public function setUp(): void {
     $this->dropByPrefix('civicrm_value_financial');
     $this->dropByPrefix('civicrm_value_favorite');
     parent::setUp();
index 19883cddc4a4ea8df9354433999d44bd88bb2c97..1846cc5a748df90b81ff20d367fc9f1349e7ee2c 100644 (file)
@@ -36,7 +36,7 @@ class ReplaceTest extends UnitTestCase {
   /**
    * Set up baseline for testing
    */
-  public function setUp() {
+  public function setUp(): void {
     $tablesToTruncate = [
       'civicrm_custom_group',
       'civicrm_custom_field',
index a0529cbd6809e325b5deaeeb782706d827864687..e9ec92d78eb51bb2afaf5ed5f22028174adef3b4 100644 (file)
@@ -41,7 +41,7 @@ class ConformanceTest extends UnitTestCase {
   /**
    * Set up baseline for testing
    */
-  public function setUp() {
+  public function setUp(): void {
     $tablesToTruncate = [
       'civicrm_custom_group',
       'civicrm_custom_field',
index efc66ffe2b7b00e85d9ce41c27101fad8a74a48a..76bbeda9a0991001f5c745ac71189f4ec3037a17 100644 (file)
@@ -27,7 +27,7 @@ use api\v4\UnitTestCase;
  */
 class ParticipantTest extends UnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $cleanup_params = [
       'tablesToTruncate' => [
index 5244fbd7fc2d29edba8c954640bdeb1325bfa453..95785071a5728cda7875b2d95332a3e5b91899e6 100644 (file)
@@ -33,7 +33,7 @@ class RotateKeyTest extends UnitTestCase {
   /**
    * Set up baseline for testing
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     \CRM_Utils_Hook::singleton()->setHook('civicrm_crypto', [$this, 'registerExampleKeys']);
     \CRM_Utils_Hook::singleton()->setHook('civicrm_cryptoRotateKey', [$this, 'onRotateKey']);
index 52c012252d19d03a467b9bf828937a75f01b8a39..4a29d0d7fb9b5cca33938a88eccd2bdbd3cbfc8e 100644 (file)
@@ -30,7 +30,7 @@ trait OptionCleanupTrait {
    */
   protected $optionValueMaxId;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->optionGroupMaxId = \CRM_Core_DAO::singleValueQuery('SELECT MAX(id) FROM civicrm_option_group');
     $this->optionValueMaxId = \CRM_Core_DAO::singleValueQuery('SELECT MAX(id) FROM civicrm_option_value');
   }