[PHPunit8] cleanup on tearDown functions
authoreileen <emcnaughton@wikimedia.org>
Thu, 25 Mar 2021 09:58:22 +0000 (22:58 +1300)
committereileen <emcnaughton@wikimedia.org>
Fri, 26 Mar 2021 02:35:41 +0000 (15:35 +1300)
103 files changed:
tests/phpunit/CRM/ACL/ListTest.php
tests/phpunit/CRM/Activity/BAO/ActivityTest.php
tests/phpunit/CRM/Activity/Form/ActivityTest.php
tests/phpunit/CRM/Activity/Form/SearchTest.php
tests/phpunit/CRM/Activity/Page/AJAXTest.php
tests/phpunit/CRM/Batch/Form/EntryTest.php
tests/phpunit/CRM/Case/BAO/CaseTest.php
tests/phpunit/CRM/Case/BAO/CaseTypeForkTest.php
tests/phpunit/CRM/Case/Form/CustomDataTest.php
tests/phpunit/CRM/Case/Form/SearchTest.php
tests/phpunit/CRM/Case/XMLProcessor/ProcessTest.php
tests/phpunit/CRM/Case/XMLProcessor/ReportTest.php
tests/phpunit/CRM/Case/XMLProcessorTest.php
tests/phpunit/CRM/Case/XMLRepositoryTest.php
tests/phpunit/CRM/Contact/BAO/ActivitySearchTest.php
tests/phpunit/CRM/Contact/BAO/ContactTest.php
tests/phpunit/CRM/Contact/BAO/ContactType/ContactSearchTest.php
tests/phpunit/CRM/Contact/BAO/ContactType/ContactTest.php
tests/phpunit/CRM/Contact/BAO/ContactType/ContactTypeTest.php
tests/phpunit/CRM/Contact/BAO/ContactType/RelationshipTest.php
tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php
tests/phpunit/CRM/Contact/BAO/GroupTest.php
tests/phpunit/CRM/Contact/BAO/QueryTest.php
tests/phpunit/CRM/Contact/BAO/RelationshipCacheTest.php
tests/phpunit/CRM/Contact/BAO/RelationshipTest.php
tests/phpunit/CRM/Contribute/BAO/ContributionTypeTest.php
tests/phpunit/CRM/Contribute/BAO/ProductTest.php
tests/phpunit/CRM/Extension/Manager/ModuleTest.php
tests/phpunit/CRM/Extension/Manager/ReportTest.php
tests/phpunit/CRM/Extension/ManagerTest.php
tests/phpunit/CRM/Extension/MapperTest.php
tests/phpunit/CRM/Financial/Form/PaymentEditTest.php
tests/phpunit/CRM/Pledge/BAO/PledgeBlockTest.php
tests/phpunit/CRM/Pledge/BAO/PledgePaymentTest.php
tests/phpunit/CRM/Pledge/BAO/PledgeTest.php
tests/phpunit/CRM/Price/BAO/PriceFieldValueTest.php
tests/phpunit/CRM/Price/BAO/PriceSetTest.php
tests/phpunit/CRM/Report/Form/ContactSummaryTest.php
tests/phpunit/CRM/Report/FormTest.php
tests/phpunit/CRM/Upgrade/Incremental/php/FiveTwentyTest.php
tests/phpunit/CRM/Utils/Cache/SqlGroupTest.php
tests/phpunit/CRM/Utils/DateTest.php
tests/phpunit/CRM/Utils/Migrate/ImportExportTest.php
tests/phpunit/Civi/CCase/SequenceListenerTest.php
tests/phpunit/CiviTest/CiviCaseTestCase.php
tests/phpunit/CiviTest/CiviReportTestCase.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/E2E/Cache/TieredTest.php
tests/phpunit/E2E/Cache/TwoInstancesTest.php
tests/phpunit/E2E/Core/PrevNextTest.php
tests/phpunit/E2E/Extern/CliRunnerTest.php
tests/phpunit/E2E/Extern/RestTest.php
tests/phpunit/api/v3/MailingTest.php
tests/phpunit/api/v3/MappingFieldTest.php
tests/phpunit/api/v3/MappingTest.php
tests/phpunit/api/v3/MembershipPaymentTest.php
tests/phpunit/api/v3/MembershipStatusTest.php
tests/phpunit/api/v3/MembershipTest.php
tests/phpunit/api/v3/MembershipTypeTest.php
tests/phpunit/api/v3/MessageTemplateTest.php
tests/phpunit/api/v3/MultilingualTest.php
tests/phpunit/api/v3/NoteTest.php
tests/phpunit/api/v3/OpenIDTest.php
tests/phpunit/api/v3/OptionGroupTest.php
tests/phpunit/api/v3/OptionValueTest.php
tests/phpunit/api/v3/OrderTest.php
tests/phpunit/api/v3/ParticipantPaymentTest.php
tests/phpunit/api/v3/ParticipantStatusTypeTest.php
tests/phpunit/api/v3/ParticipantTest.php
tests/phpunit/api/v3/PaymentProcessorTest.php
tests/phpunit/api/v3/PaymentProcessorTypeTest.php
tests/phpunit/api/v3/PaymentTest.php
tests/phpunit/api/v3/PaymentTokenTest.php
tests/phpunit/api/v3/PcpTest.php
tests/phpunit/api/v3/PhoneTest.php
tests/phpunit/api/v3/PledgePaymentTest.php
tests/phpunit/api/v3/PledgeTest.php
tests/phpunit/api/v3/PriceFieldTest.php
tests/phpunit/api/v3/PriceFieldValueTest.php
tests/phpunit/api/v3/PriceSetTest.php
tests/phpunit/api/v3/ProductTest.php
tests/phpunit/api/v3/ProfileTest.php
tests/phpunit/api/v3/RelationshipTest.php
tests/phpunit/api/v3/RelationshipTypeTest.php
tests/phpunit/api/v3/SelectQueryTest.php
tests/phpunit/api/v3/SettingTest.php
tests/phpunit/api/v3/StateProvinceTest.php
tests/phpunit/api/v3/StatusPreferenceTest.php
tests/phpunit/api/v3/SurveyRespondantTest.php
tests/phpunit/api/v3/SurveyTest.php
tests/phpunit/api/v3/SyntaxConformanceTest.php
tests/phpunit/api/v3/SystemCheckTest.php
tests/phpunit/api/v3/SystemTest.php
tests/phpunit/api/v3/TagTest.php
tests/phpunit/api/v3/TaxContributionPageTest.php
tests/phpunit/api/v3/UFFieldTest.php
tests/phpunit/api/v3/UFGroupTest.php
tests/phpunit/api/v3/UFJoinTest.php
tests/phpunit/api/v3/UFMatchTest.php
tests/phpunit/api/v3/UserTest.php
tests/phpunit/api/v3/UtilsTest.php
tests/phpunit/api/v3/ValidateTest.php
tests/phpunit/api/v3/WebsiteTest.php

index c435ffca4cb9258f7d2ba5696a920939ab40a04b..73bd29a9d6ac0dc3a249c1aec95f38cba88c68f3 100644 (file)
@@ -13,7 +13,7 @@ class CRM_ACL_ListTest extends CiviUnitTestCase {
   /**
    * Set up function.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     // $this->quickCleanup(array('civicrm_acl_contact_cache'), TRUE);
     $this->useTransaction(TRUE);
index 30c927b7f5b04c2acce17df0f165c9254cb5d41a..6e0a62a6abc7348842a90e18eea3ed8dfb5cd5ee 100644 (file)
@@ -17,7 +17,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
    *
    * @throws \CiviCRM_API3_Exception
    */
-  public function setUp() {
+  public function setUp():void {
     parent::setUp();
     $this->prepareForACLs();
     CRM_Core_Config::singleton()->userPermissionClass->permissions = ['view all contacts', 'access CiviCRM'];
index 8e603a500dc20ad1abe417d8ae9b9ae65579ab14..23969a1216c9b61dbcbc1bc27dd520f457678eb9 100644 (file)
@@ -8,7 +8,7 @@ use Civi\Test\Invasive;
  */
 class CRM_Activity_Form_ActivityTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp():void {
     parent::setUp();
     $this->assignee1 = $this->individualCreate([
       'first_name' => 'testassignee1',
index 3cddd3f2d51f2d9861de4af49bc87a575339f869..324ce667d923183cba4481fbc7843e410d4fb17e 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Activity_Form_SearchTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->individualID = $this->individualCreate();
     $this->contributionCreate([
index f9e9f7506f983c6e7e2080f5a91cf8f427898932..0864cc9fbd0090160bf7364559ff698da923d08c 100644 (file)
@@ -5,7 +5,7 @@
  */
 class CRM_Activity_Page_AJAXTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->loadAllFixtures();
index 3af9d83648fa76b2f71a0e280a552380ccd41226..8dc8ee08b174851fe87bdc41077a666907b62a32 100644 (file)
@@ -75,7 +75,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
    */
   protected $_contactID4 = NULL;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $params = [
index b16fe72620558b156044f2a97725f2282c8edd6d..43b42d3d98507a96b59067926527cfaa14afbf9c 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Case_BAO_CaseTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->tablesToTruncate = [
index 82455b571c1a285ffd8c3007f01031e85ad0c1a4..e77dbda7d46672c2752af96852cce7ac6f424539 100644 (file)
@@ -7,7 +7,7 @@
  */
 class CRM_Case_BAO_CaseTypeForkTest extends CiviCaseTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
   }
index 949964169388eda48461bff7e71e04df400d765c..1e276558ef381f35a44df945642364fd1906459c 100644 (file)
@@ -9,7 +9,7 @@ class CRM_Case_Form_CustomDataTest extends CiviCaseTestCase {
 
   protected $custom_group;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->custom_group = $this->customGroupCreate(['extends' => 'Case']);
     $this->custom_group = $this->custom_group['values'][$this->custom_group['id']];
index 42c499d2aa5ffc0edb71177f8986e3f078d9cdbd..2266f1b3b1562730ff62a13c944ef5f0300d9f1a 100644 (file)
@@ -7,7 +7,7 @@ require_once 'CiviTest/CiviCaseTestCase.php';
  */
 class CRM_Case_Form_SearchTest extends CiviCaseTestCase {
 
-  public function setUp() {
+  public function setUp():void {
     parent::setUp();
     $this->quickCleanup(['civicrm_case_contact', 'civicrm_case', 'civicrm_contact']);
   }
index d287613b413033709487c704582729ac2a2bd555..f16b697e439e2db219537de3492ea1f29848a566 100644 (file)
@@ -7,7 +7,7 @@ require_once 'CiviTest/CiviCaseTestCase.php';
  */
 class CRM_Case_XMLProcessor_ProcessTest extends CiviCaseTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->defaultAssigneeOptionsValues = [];
index b1e2526dc0b5aeb35925c0a844a1fd135c73d0eb..acc3bcad98f35e6a85a72ae255f7a622c36a60d5 100644 (file)
@@ -7,7 +7,7 @@ require_once 'CiviTest/CiviCaseTestCase.php';
  */
 class CRM_Case_XMLProcessor_ReportTest extends CiviCaseTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->simplifyCaseTypeDefinition();
index 5a12916bd4c8dbe1934e1b21c988fbc42defc270..8a87b5f009038029d4bc6f1a82ba025d6ab785cb 100644 (file)
@@ -7,7 +7,7 @@ require_once 'CiviTest/CiviCaseTestCase.php';
  */
 class CRM_Case_XMLProcessorTest extends CiviCaseTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->processor = new CRM_Case_XMLProcessor();
index fe6e4c5e3a927a5482a784cf65a87f08a7308241..9cf37e091e8458fff371faa25e04468c68093aa6 100644 (file)
@@ -7,7 +7,7 @@
 class CRM_Case_XMLRepositoryTest extends CiviUnitTestCase {
   protected $fixtures = [];
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->fixtures['CaseTypeWithSingleActivityType'] = '
 <CaseType>
index ffb38360b959851c908ad8a893c077d1129185e4..78e3bdb3b52f383cf05c38e0e8fa7930766c1744 100644 (file)
@@ -52,7 +52,7 @@ class CRM_Contact_BAO_ActivitySearchTest extends CiviUnitTestCase {
    * Connect to the database, truncate the tables that will be used
    * and redirect stdin to a temporary file
    */
-  public function setUp() {
+  public function setUp(): void {
     // Connect to the database
     parent::setUp();
 
index 84689e5dcd7b843e52a26edea246769f764b4624..aa307e7b6181d3865d8f7640b73dcd23c9b7be68 100644 (file)
@@ -6,13 +6,6 @@
  */
 class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
 
-  /**
-   * Set up function.
-   */
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Test case for add( ).
    *
index c22ace62419afc387767efc595d1eae2144a01e0..ead6037968751060b3c19102c7857eac05dfbfbc 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Contact_BAO_ContactType_ContactSearchTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $students = 'indivi_student' . substr(sha1(rand()), 0, 7);
     $params = [
index d748416f7f2d0561f1e9df68b6cec0f09f39493e..64a28032a5e9ae154788f12ee5a7255e20106fa0 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Contact_BAO_ContactType_ContactTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $params = [
index 9bae2dfd98d9188c39b9cd0984f0167c9bbcacfd..9adee0c3b4320f59d44d4d49ab11f423145f8839 100644 (file)
@@ -7,7 +7,7 @@ use Civi\Api4\ContactType;
  */
 class CRM_Contact_BAO_ContactType_ContactTypeTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $params = [
       'label' => 'sub1_individual',
index 9021286c4c946d0f51a73c82e1579f8673772725..8d1ce0af6d9b1aae097949ccc6f1df08a0c604ff 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Contact_BAO_ContactType_RelationshipTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     //create contact subtypes
index d517143c58b27441096f5b086e2e880bac799022..a0d06a8d263aae7e62208b7bb456b22c9f05da97 100644 (file)
@@ -245,16 +245,6 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase {
    */
   private $_testObjects;
 
-  /**
-   * Sets up the fixture, for example, opens a network connection.
-   *
-   * This method is called before a test is executed.
-   */
-  protected function setUp() {
-    $this->_testObjects = [];
-    parent::setUp();
-  }
-
   /**
    * Tears down the fixture, for example, closes a network connection.
    *
index 49c1a49a3f6f38825478b6ca43092d4dd66dc301..12a30dd15a08d2db86c7c5f7618907fd302f8981 100644 (file)
  */
 class CRM_Contact_BAO_GroupTest 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.
    *
index 7e4789b6106dfe13eb42baf37f3647f10ad24571..03dd50e4ef67e151816f9d0ee1598f8222628927 100644 (file)
@@ -17,10 +17,6 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase {
     return new CRM_Contact_BAO_QueryTestDataProvider();
   }
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Clean up after test.
    *
index 67fd78535ed8468fdf021ea5b9ce04807f915fda..44cd3c53ee090a84f1564a77e35d3ae4f48ded5e 100644 (file)
@@ -17,7 +17,7 @@
  */
 class CRM_Contact_BAO_RelationshipCacheTest extends CiviUnitTestCase {
 
-  protected function setUp() {
+  protected function setUp(): void {
     $this->useTransaction(TRUE);
     parent::setUp();
   }
index 1d0f42d89153c3a8c983162c0f836bffe9557c0e..a78e350c5b7e5181e6ef818edeef028d6d640103 100644 (file)
  */
 class CRM_Contact_BAO_RelationshipTest 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.
    *
index 976e06cfcf21022e6497ee805ce730a9080d5637..aca4e92b5f44e0f0b2f788cbd290d465db3c0742 100644 (file)
@@ -15,7 +15,7 @@
  */
 class CRM_Contribute_BAO_ContributionTypeTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->organizationCreate();
   }
index 90d416a955ae52e8df3f6be19e61802a2228fb84..f242ed60858f6af4976b79288e4e8ea6ebab9736 100644 (file)
  */
 class CRM_Contribute_BAO_ProductTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Check method add()
    */
index 847337cdde154478ea2e80b076dd27dcb1269f0e..53e12840c40a53ecc0b65a9a5ef82f9163bf0eed 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Extension_Manager_ModuleTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp():void {
     parent::setUp();
     // $query = "INSERT INTO civicrm_domain ( name, version ) VALUES ( 'domain', 3 )";
     // $result = CRM_Core_DAO::executeQuery($query);
index 110b505ce99b25f91743348e5931e4eae62ffbcb..be7029c65ff64dc0d1a80017ddfc6c8f1b83139a 100644 (file)
@@ -6,7 +6,7 @@
  */
 class CRM_Extension_Manager_ReportTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     //if (class_exists('test_extension_manager_reporttest')) {
     //  test_extension_manager_reporttest::$counts = array();
@@ -17,10 +17,6 @@ class CRM_Extension_Manager_ReportTest extends CiviUnitTestCase {
     ]);
   }
 
-  public function tearDown() {
-    parent::tearDown();
-  }
-
   /**
    * Install an extension with a valid type name.
    */
index 52396f41ba57626a28d2c160c8adccf604723fb8..ea1c71a53baa025a035a6eb7c1b7cf1624c381fa 100644 (file)
@@ -17,16 +17,12 @@ class CRM_Extension_ManagerTest extends CiviUnitTestCase {
   const TESTING_TYPE = 'report';
   const OTHER_TESTING_TYPE = 'module';
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     list ($this->basedir, $this->container) = $this->_createContainer();
     $this->mapper = new CRM_Extension_Mapper($this->container);
   }
 
-  public function tearDown() {
-    parent::tearDown();
-  }
-
   /**
    * Install an extension with an invalid type name.
    *
index da9ba2c61eaf497f6765b56375bd344198a55187..1f7a955c3e56972ff28a74fb149b53ec8e20e073 100644 (file)
@@ -36,7 +36,7 @@ class CRM_Extension_MapperTest extends CiviUnitTestCase {
    */
   protected $mapperWithSlash;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     list ($this->basedir, $this->container) = $this->_createContainer();
     $this->mapper = new CRM_Extension_Mapper($this->container);
@@ -45,10 +45,6 @@ class CRM_Extension_MapperTest extends CiviUnitTestCase {
     $this->mapperWithSlash = new CRM_Extension_Mapper($this->containerWithSlash);
   }
 
-  public function tearDown() {
-    parent::tearDown();
-  }
-
   public function testClassToKey() {
     $this->assertEquals("test.foo.bar", $this->mapper->classToKey('test_foo_bar'));
   }
index 39042cfb40cc691ee20e5e93be31f6c33a55af89..88119ae5b10fdf793c3e7adb6f3a35cf3e8834e2 100644 (file)
@@ -19,7 +19,7 @@ class CRM_Financial_Form_PaymentEditTest extends CiviUnitTestCase {
   /**
    * Setup function.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->createLoggedInUser();
 
index 6832bb8965c2a39502e1edf6a1d45b17f04f8d04..6144b7558d81433b9fd31d6571cab76f9eeb3efd 100644 (file)
@@ -21,19 +21,12 @@ class CRM_Pledge_BAO_PledgeBlockTest extends CiviUnitTestCase {
    * Sets up the fixture, for example, opens a network connection.
    * This method is called before a test is executed.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $contributionPage = $this->contributionPageCreate();
     $this->_contributionPageId = $contributionPage['id'];
   }
 
-  /**
-   * Tears down the fixture, for example, closes a network connection.
-   * This method is called after a test is executed.
-   */
-  protected function tearDown() {
-  }
-
   /**
    *  create() and deletepledgeblock() method
    */
index 811ae2614498a4653ba74b322ea043e92ff51036..a5413a0288dd3c6c3c3c3339dd064a95d19f0303 100644 (file)
  */
 class CRM_Pledge_BAO_PledgePaymentTest 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() {
-  }
-
   /**
    *  Test for Add/Update Pledge Payment.
    */
index 536f24afadf5f8caf0397a3ab47c55cf21928a04..182ee91b7c2e0712f3302c75d7ed4f62afa4af9c 100644 (file)
@@ -23,7 +23,7 @@ class CRM_Pledge_BAO_PledgeTest extends CiviUnitTestCase {
    *
    * @throws \CiviCRM_API3_Exception
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->ids['Contact'][0] = $this->individualCreate();
     $this->_params = [
@@ -43,13 +43,6 @@ class CRM_Pledge_BAO_PledgeTest extends CiviUnitTestCase {
     ];
   }
 
-  /**
-   * Tears down the fixture, for example, closes a network connection.
-   * This method is called after a test is executed.
-   */
-  protected function tearDown() {
-  }
-
   /**
    *  Test for Add/Update Pledge.
    *
index 23261b4c66bfc491b71ef46b0fe9988d4c79e961..d229b86a00a77431ed847baf5c8ca049a74f9e77 100644 (file)
  */
 class CRM_Price_BAO_PriceFieldValueTest extends CiviUnitTestCase {
 
-  /**
-   * Sets up the fixtures.
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
-  /**
-   * Tears down the fixture.
-   */
-  protected function tearDown() {
-  }
-
   /**
    * Verifies visibility field exists and is configured as a pseudoconstant
    * referencing the 'visibility' option group.
index 36e1e19285cce230bcf428170f797129af13de29..c0c93e1aaa13c7b327da34ec47f0ff10d4498dfc 100644 (file)
  */
 class CRM_Price_BAO_PriceSetTest extends CiviUnitTestCase {
 
-  /**
-   * Sets up the fixtures.
-   */
-  protected function setUp() {
-    parent::setUp();
-  }
-
-  /**
-   * Tears down the fixture.
-   */
-  protected function tearDown() {
-  }
-
   /**
    * Test the correct amount level is returned for an event which is not presented as a price set event.
    *
index 47f269e43b8b001f4d6ba7293cafc81ffa252533..83cc4cf686daebc7115d999ff8236304daefe6c2 100644 (file)
@@ -22,15 +22,11 @@ class CRM_Report_Form_ContactSummaryTest extends CiviReportTestCase {
     'civicrm_address',
   ];
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->quickCleanup($this->_tablesToTruncate);
   }
 
-  public function tearDown() {
-    parent::tearDown();
-  }
-
   /**
    * Ensure the new Odd/Event street number sort column works correctly
    */
index 8ce39c5b99f6704c8f8cdbc0a5990b27216333e0..a7712723d257714a7b8c7f1bfd78a9dd26421da0 100644 (file)
  */
 class CRM_Report_FormTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    // There are only unit tests here at present, we can skip database loading.
-    return TRUE;
-  }
-
-  public function tearDown() {
-    // There are only unit tests here at present, we can skip database loading.
-    return TRUE;
-  }
-
   /**
    * Used by testGetFromTo
    */
index 14aa68c27f20fb18acbf84933fd92aa7240f29da..f222e46a0cc94feb1cfaef0735597a4b2bbd71ad 100644 (file)
@@ -7,10 +7,6 @@ require_once 'CiviTest/CiviCaseTestCase.php';
  */
 class CRM_Upgrade_Incremental_php_FiveTwentyTest extends CiviCaseTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
   /**
    * Test that the upgrade task changes the direction but only
    * for bidirectional relationship types that are b_a.
index 68d1ac325032bf4368bc68c52d35f0b685c461ea..2bfdcae2456eb000e5001438f74dce1377d467b0 100644 (file)
@@ -6,14 +6,6 @@
  */
 class CRM_Utils_Cache_SqlGroupTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-  }
-
-  public function tearDown() {
-    parent::tearDown();
-  }
-
   /**
    * Add and remove two items from the same cache instance.
    */
index 65afb0384ae432b52adf981f29b97956293ed82f..ac73ae3bb6eca0e51f79137b0a0c6a6bf8805781 100644 (file)
  */
 class CRM_Utils_DateTest extends CiviUnitTestCase {
 
-  public function setUp() {
-    // There are only unit tests here at present, we can skip database loading.
-    return TRUE;
-  }
-
-  public function tearDown() {
-    // There are only unit tests here at present, we can skip database loading.
-    return TRUE;
-  }
-
   /**
    * Used by testGetFromTo
    */
index 0e3e7c7009ba721d4bf5b3416b8309d4a3317974..d72b5579095cab69083bfb57e8f87937caae4f57 100644 (file)
@@ -5,12 +5,6 @@
  * @group headless
  */
 class CRM_Utils_Migrate_ImportExportTest extends CiviUnitTestCase {
-  protected $_apiversion;
-
-  public function setUp() {
-    $this->_apiversion = 3;
-    parent::setUp();
-  }
 
   public function tearDown(): void {
     $tablesToTruncate = [
index 1d3afb246e088bb509f1c1c2e95a2103070d1556..88759ebc45628e090e9cd60220f699a18871cee0 100644 (file)
@@ -9,7 +9,7 @@ namespace Civi\CCase;
  */
 class SequenceListenerTest extends \CiviCaseTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_params = [
       'case_type' => $this->caseType,
index 44b03ad3170fa4c522106aa72774b1270e9f8c99..f13ee024d47b97185a09504fe0bba1dececa4f34 100644 (file)
@@ -28,7 +28,7 @@ class CiviCaseTestCase extends CiviUnitTestCase {
 
   protected $_loggedInUser;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     // CRM-9404 - set-up is a bit cumbersome but had to put something in place to set up activity types & case types
@@ -110,7 +110,7 @@ class CiviCaseTestCase 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->quickCleanup($this->tablesToTruncate, TRUE);
     $this->customDirectories(array('template_path' => FALSE));
     CRM_Case_XMLRepository::singleton(TRUE);
index fca4ea43ad7ca7506b546d107325de60d93c7882..d3f1e4adfd6e215eaa76c033b1a6428eeca35bdb 100644 (file)
  */
 class CiviReportTestCase extends CiviUnitTestCase {
 
-  public function setUp() {
-    parent::setUp();
-    $this->_sethtmlGlobals();
-  }
-
-  public function tearDown() {
+  public function tearDown(): void {
     // TODO Figure out how to automatically drop all temporary tables.
     // Note that MySQL doesn't provide a way to list them, so we would need
     // to keep track ourselves (eg CRM_Core_TemporaryTableManager) or reset
index 1792a1c229616f0205d68de52a8b5bb500793a58..8a78474af552e4e45113fc8149df7da70be7a045 100644 (file)
@@ -462,7 +462,7 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
   /**
    *  Common teardown functions for all unit tests.
    */
-  protected function tearDown() {
+  protected function tearDown(): void {
     $this->_apiversion = 3;
     $this->resetLabels();
 
index df3e8357b40b21cb0298e55dcab5ae5df8f070ae..a68900238ff3daa870adcaa308a139085bd678d7 100644 (file)
@@ -27,7 +27,7 @@ class E2E_Cache_TieredTest extends E2E_Cache_CacheTestCase {
    */
   protected $b;
 
-  protected function tearDown() {
+  protected function tearDown(): void {
     if (function_exists('timecop_return')) {
       timecop_return();
     }
index 875e692a0343c95017efd4564563b71c7cd13cec..73e9f554df594c82977b61119717b6953df7d58b 100644 (file)
@@ -31,7 +31,7 @@ class E2E_Cache_TwoInstancesTest extends CiviEndToEndTestCase {
     $this->a = $this->b = NULL;
   }
 
-  protected function tearDown() {
+  protected function tearDown(): void {
     parent::tearDown();
     if ($this->a) {
       $this->a->clear();
index 7d0d944429e6ef7e0cd91cfd519ff6f9a051b06d..fb598f6e7eb3ab809b51c764fe4ccf2a448d137f 100644 (file)
@@ -38,7 +38,7 @@ class PrevNextTest extends \CiviEndToEndTestCase {
     );
   }
 
-  protected function tearDown() {
+  protected function tearDown(): void {
     \Civi::service('prevnext')->deleteItem(NULL, $this->cacheKey);
     \Civi::service('prevnext')->deleteItem(NULL, $this->cacheKeyB);
   }
index 0117073647978c1e1c5b4c46a7f9d8fd6fce1358..db1bf239cbcfb44608b00a4ee0c8730a7f436359 100644 (file)
@@ -23,7 +23,7 @@
  */
 class E2E_Extern_CliRunnerTest extends CiviEndToEndTestCase {
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     foreach (['CIVI_CORE', 'CMS_ROOT', 'CMS_URL'] as $var) {
@@ -33,10 +33,6 @@ class E2E_Extern_CliRunnerTest extends CiviEndToEndTestCase {
     }
   }
 
-  protected function tearDown() {
-    parent::tearDown();
-  }
-
   /**
    * @return array
    *   Each case gives a name (eg "cv") and template for executing the command
index 22fbaedd3f450cdf0f141e3b0a6dc191faba2815..ed3aed7019bc43e969f97980483736212e38ad3e 100644 (file)
@@ -36,7 +36,7 @@ class E2E_Extern_RestTest extends CiviEndToEndTestCase {
     //$this->assertEquals($cmpvar, $apiResult['is_error'], $prefix . print_r($apiResult, TRUE));
   }
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     if (empty($GLOBALS['_CV']['CIVI_SITE_KEY'])) {
@@ -51,7 +51,7 @@ class E2E_Extern_RestTest extends CiviEndToEndTestCase {
       ->getUrl('civicrm', 'extern/rest.php');
   }
 
-  protected function tearDown() {
+  protected function tearDown(): void {
     if (!empty($this->old_api_keys)) {
       foreach ($this->old_api_keys as $cid => $apiKey) {
         civicrm_api3('Contact', 'create', array(
index 163747c60e56a0acd8999c84d6336e8d594af765..f2e325fe80c2c044a5f185553bc6dd2948d2b8b5 100644 (file)
@@ -44,7 +44,7 @@ class api_v3_MailingTest extends CiviUnitTestCase {
    */
   protected $footer;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction();
     // DGW
index ad6ab9dfc3663c026b47d06992ef9d905db8124d..eac98e582a13bdecb5de88872f433c27d6def0bb 100644 (file)
@@ -25,7 +25,7 @@ class api_v3_MappingFieldTest extends CiviUnitTestCase {
 
   public $DBResetRequired = FALSE;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
 
index 729c7f9a686de26856c69f9fd75e3cfdce45fb8d..f8fc8376b1a15cc95d5b8746a1c134ea9ddaadce 100644 (file)
@@ -25,7 +25,7 @@ class api_v3_MappingTest extends CiviUnitTestCase {
 
   public $DBResetRequired = FALSE;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
 
index 92b689ce39d2e329b575093d5003f3090c2f9a76..72d6610c6d977730d64a6ed62e562dca835ec3d3 100644 (file)
@@ -23,7 +23,7 @@ class api_v3_MembershipPaymentTest extends CiviUnitTestCase {
   protected $_membershipStatusID;
   protected $_contribution = [];
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
 
index f04553c5730ce1cd2171d53cfdc4c5f9ef941b79..c7f693c48b671e00b72db0b88d8d0cb43416bf0a 100644 (file)
@@ -21,7 +21,7 @@ class api_v3_MembershipStatusTest extends CiviUnitTestCase {
 
   protected $_apiversion = 3;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_contactID = $this->individualCreate();
     $this->_membershipTypeID = $this->membershipTypeCreate(['member_of_contact_id' => $this->_contactID]);
index ac6622bf5ba37ffd159561c2a06a8fe7202d68c3..24feffa2a1d764ff5cb85d4262d13af21f2b5d99 100644 (file)
@@ -41,7 +41,7 @@ class api_v3_MembershipTest extends CiviUnitTestCase {
   /**
    * Set up for tests.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_contactID = $this->individualCreate();
     $this->_membershipTypeID = $this->membershipTypeCreate(['member_of_contact_id' => $this->_contactID]);
index 170cee5ccdc3c84be78c4e6dfd6a0c819003de7a..4ffc4b1437f43073d4a573dff0e65ad550d5fa64 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_MembershipTypeTest extends CiviUnitTestCase {
   /**
    * Set up for tests.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_contactID = $this->organizationCreate();
index a1f77690cd2d76e91819fe54875dc1a5498ae900..5272a1cc63c179b26053c4ed2ba8acaff0d1f5f7 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_MessageTemplateTest extends CiviUnitTestCase {
   protected $entity = 'MessageTemplate';
   protected $params;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->_apiversion = 3;
     parent::setUp();
     $this->useTransaction(TRUE);
index 5690cc86620f14aff9cf34199c477a4a391fc9bd..f619443929107ab63824ca1fc0a1235d44f95cc5 100644 (file)
@@ -24,7 +24,7 @@ class api_v3_MultilingualTest extends CiviUnitTestCase {
    *
    * This method is called before a test is executed.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
   }
index 8b2021df46fefd4be7e4a04423145cb7b6b83fa1..a0c5bf0e5b1f18eff3a5eb2edbd443c20a7b9210 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_NoteTest extends CiviUnitTestCase {
   protected $_noteID;
   protected $_note;
 
-  public function setUp() {
+  public function setUp(): void {
 
     // Connect to the database.
     parent::setUp();
index 5c554ab006d756feac8e4249f59074de764a91a7..34db4ab6e8c7e7ec0d50294f92855285d089cd3c 100644 (file)
@@ -31,7 +31,7 @@ class api_v3_OpenIDTest extends CiviUnitTestCase {
 
   public $DBResetRequired = FALSE;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction();
 
index 1a5272c2c2e4ccea6a5bc1a30fc4c92ba6bdd6fd..daf2ff0012588f9366fa115b920dec99f48f64ab 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_OptionGroupTest extends CiviUnitTestCase {
 
   protected $_entity = 'OptionGroup';
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_params = [
index 623296a559d986dbcbd54f29c7a7c0c3a7c252c6..6641cde5ad7b56eeb22a86cddb5095d911d90d44 100644 (file)
@@ -16,7 +16,7 @@
 class api_v3_OptionValueTest extends CiviUnitTestCase {
   protected $_apiversion = 3;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
   }
index d51e1c732e7226d1340be415b3a4f4d180a1bbc2..497d5bc3a0531c65d11cdd5d350a99a051ea68ef 100644 (file)
@@ -27,7 +27,7 @@ class api_v3_OrderTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->_apiversion = 3;
index e040c69b8dda896a43c8ae517fcba6600d460ff3..2841eeb44a95623a0fb50477ff51fa653976a756 100644 (file)
@@ -29,7 +29,7 @@ class api_v3_ParticipantPaymentTest extends CiviUnitTestCase {
   /**
    * Set up for tests.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     $event = $this->eventCreate(NULL);
index a7e74ddc82b61e37e566f8b70d81073af1c5ab30..441b12ccbc7892fd1d84f96a57f5b86010af019b 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_ParticipantStatusTypeTest extends CiviUnitTestCase {
 
   public $DBResetRequired = FALSE;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->_apiversion = 3;
     $this->params = [
       'name' => 'test status',
index 8d09b7603b1d2d088a2aca2326e5aaf14ba5ce5f..954c34e9bbe54108efb2a92286b642a686b4cea3 100644 (file)
@@ -31,7 +31,7 @@ class api_v3_ParticipantTest extends CiviUnitTestCase {
   protected $_individualId;
   protected $_params;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->_apiversion = 3;
     parent::setUp();
     $this->_entity = 'participant';
index 115040870f082d0532cebae47585ae25b0686221..1d8859a867ecbf759e6aa9e828caaff9ad9eb002 100644 (file)
@@ -23,7 +23,7 @@ class api_v3_PaymentProcessorTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     // Create dummy processor
index a97e61ce4c49649d2926e1862cfd246c52b31346..4e5709831e7b7440ff4fd99e1dffbe37df75a85e 100644 (file)
@@ -17,7 +17,7 @@
 class api_v3_PaymentProcessorTypeTest extends CiviUnitTestCase {
   protected $_ppTypeID;
 
-  public function setUp() {
+  public function setUp(): void {
 
     parent::setUp();
     $this->useTransaction(TRUE);
index 659e33d82afe0fca8dade8fcf144eca3b20dc381..e319f5040758bffe3598632584c5cb4b398183d1 100644 (file)
@@ -27,7 +27,7 @@ class api_v3_PaymentTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     $this->_apiversion = 3;
index 85cefb35889f477d97d180a2175ce5421b438853..a19200f7d24ab950f183f52d91b879ac35ae476d 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_PaymentTokenTest extends CiviUnitTestCase {
 
   public $DBResetRequired = FALSE;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->_apiversion = 3;
     $this->useTransaction(TRUE);
     parent::setUp();
index 4f609a448c8aa71c5cba42a67b8fcdb09aefdf56..500f963a929360661535bddfd81cecf37043922b 100644 (file)
@@ -33,7 +33,7 @@ class api_v3_PcpTest extends CiviUnitTestCase {
   protected $entity = 'Pcp';
   public $DBResetRequired = TRUE;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->params = [
       'title' => "Pcp title",
       'contact_id' => 1,
index ea2cbc882ffc9107e37f8d642bf2ea46e0413788..0f34561d3b1d948d18d3038f7457c9b167efc536 100644 (file)
@@ -29,7 +29,7 @@ class api_v3_PhoneTest extends CiviUnitTestCase {
    */
   protected $isLocationTypesOnPostAssert = TRUE;
 
-  public function setUp() {
+  public function setUp(): void {
     $this->_entity = 'Phone';
     parent::setUp();
     $this->useTransaction();
index 1bd7016e0b255c43eb227ca691d8812d886cccbb..4f1afba6c7a29d9416bfe380acfb829744bbf4b7 100644 (file)
@@ -28,7 +28,7 @@ class api_v3_PledgePaymentTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_individualId = $this->individualCreate();
     $this->_pledgeID = $this->pledgeCreate(['contact_id' => $this->_individualId]);
index 426c2987eb9efd3f9b7c6fd8b06ae17c28220f70..9e8358d3965285b98586ee804aab730fdca993ba 100644 (file)
@@ -26,7 +26,7 @@ class api_v3_PledgeTest extends CiviUnitTestCase {
   /**
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     $this->_apiversion = 3;
     parent::setUp();
     $this->quickCleanup(['civicrm_pledge', 'civicrm_pledge_payment']);
index bfde926bc4bf9cb6a2cd1fd036c79f3fa884a1a6..3f68eafaf099b7d768beabb3b9399a5f5da6c629 100644 (file)
@@ -24,7 +24,7 @@ class api_v3_PriceFieldTest extends CiviUnitTestCase {
    *
    * @throws \CRM_Core_Exception
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $priceSetparams = [
       'name' => 'default_goat_priceset',
index 4f11b37639cc963b0e2d5f4d7169012b772da279..24518fe5cdc690dd372461a74dcd45d94fd56451 100644 (file)
@@ -30,7 +30,7 @@ class api_v3_PriceFieldValueTest extends CiviUnitTestCase {
   /**
    * Setup function.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     // Put stuff here that should happen before all tests in this unit.
     $priceSetParams = [
index fbe747c2d331d58edb161723db9b10b0e746924e..1fa81b255f3358e1640ca76f1db32624f5c1384e 100644 (file)
@@ -25,7 +25,7 @@ class api_v3_PriceSetTest extends CiviUnitTestCase {
   /**
    * Set up for class.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_params = [
       'name' => 'default_goat_priceset',
index 73d685cb882020d4ab1f8754787824d90d641e66..d68c3e9d2a7574ff6d80c11b03bdfeebf22f6d14 100644 (file)
@@ -19,7 +19,7 @@ class api_v3_ProductTest extends CiviUnitTestCase {
 
   protected $_entity = 'Product';
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction();
     $this->_params = [
index 0d5d3a4e034cc7d53bebd4fd448cfc0b9f321cc8..8733289fc3faa0fd5ad70ce627794cf2614f32b2 100644 (file)
@@ -27,7 +27,7 @@ class api_v3_ProfileTest extends CiviUnitTestCase {
   /**
    * Set up for test.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $config = CRM_Core_Config::singleton();
     $countryLimit = $config->countryLimit;
index 64a3c981347ab93374bc7dae91be2ba8cba643d8..963a5bdd5d9bbaa5361ac4417e2dff13fb8a0ee2 100644 (file)
@@ -41,7 +41,7 @@ class api_v3_RelationshipTest extends CiviUnitTestCase {
   /**
    * Set up function.
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_cId_a = $this->individualCreate();
     $this->_cId_a_2 = $this->individualCreate([
index 88334e050ff9bd8bd15c2a9c91ea33c23ef007f8..db1716cc2c130403b3599925a124f8c91558b78f 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_RelationshipTypeTest extends CiviUnitTestCase {
   protected $_relTypeID;
   protected $_apiversion = 3;
 
-  public function setUp() {
+  public function setUp(): void {
 
     parent::setUp();
     $this->_cId_a = $this->individualCreate();
index ebf0acc34f4fff6b043416bc8aa2348e8e4af892..183772d2f8005c140561ef96d2f900d554ad6b2d 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_SelectQueryTest extends CiviUnitTestCase {
   private $hookEntity;
   private $hookCondition = [];
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     CRM_Utils_Hook::singleton()->setHook('civicrm_selectWhereClause', [$this, 'hook_civicrm_selectWhereClause']);
index 427b2f1cee14320b0fb6bd3296f6a789c28fc6de..1bc407ee8258fdf9c36e0f9c764d0619a91e4b31 100644 (file)
@@ -29,7 +29,7 @@ class api_v3_SettingTest extends CiviUnitTestCase {
   protected $_domainID2;
   protected $_domainID3;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $params = [
       'name' => __CLASS__ . 'Second Domain',
index 7085bf5efb2215695a83ada444ecdab05446ba00..15635ac2b768b545a255505c6febfba029785663 100644 (file)
@@ -19,7 +19,7 @@
 class api_v3_StateProvinceTest extends CiviUnitTestCase {
   protected $_params;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_params = [
index 6d9b117ad798a1f00c594a1ce4d57f5dd60b6504..d566260c41e01083a5192f5e74b52ed2d6d4b7e8 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_StatusPreferenceTest extends CiviUnitTestCase {
   protected $_locationType;
   protected $_params;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_params = [
index 4b71be0c6d33b63490a05039b75259e4b8600289..8b05ed863cb111741ac803f1f71c1c57af68783d 100644 (file)
@@ -17,7 +17,7 @@ class api_v3_SurveyRespondantTest extends CiviUnitTestCase {
   protected $_apiversion = 3;
   protected $params;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     $phoneBankActivity = $this->callAPISuccess('Option_value', 'Get', ['label' => 'PhoneBank', 'sequential' => 1]);
index cd2c532d8f5919cb34662b0fa026fc78a2ab176d..d08f53cc87539a184ff432d3f3a1861afd49914d 100644 (file)
@@ -33,7 +33,7 @@ class api_v3_SurveyTest extends CiviUnitTestCase {
   protected $entity = 'survey';
   public $DBResetRequired = FALSE;
 
-  public function setUp() {
+  public function setUp(): void {
     $phoneBankActivityTypeID = $this->callAPISuccessGetValue('Option_value', [
       'label' => 'PhoneBank',
       'return' => 'value',
index 64eebcf9c532e4b9d7c9a5696ecc7f4128ad1f93..bcc4326976a59a8206fffad9971e5f9b4011d352 100644 (file)
@@ -81,7 +81,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
    * and that will never exist (eg an obsoleted Entity
    * they need to be returned by the function toBeSkipped_{$action} (because it has to be a static method and therefore couldn't access a this->toBeSkipped)
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->enableCiviCampaign();
     $this->toBeImplemented['get'] = [
index 89d2df1f0cf3638666aa728dab622a29a3ab2242..d44f062fba644d28fb920e0eedd137366a9815d3 100644 (file)
@@ -21,7 +21,7 @@
  */
 class api_v3_SystemCheckTest extends CiviUnitTestCase {
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
   }
index 7aef4b55af8bceade083bde78b845a287235eda0..8eae0622a712adc83d4c537e174fddb5b79a9e3a 100644 (file)
@@ -25,7 +25,7 @@ class api_v3_SystemTest extends CiviUnitTestCase {
    *
    * This method is called before a test is executed.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
   }
index 59c2d06abf320f4e7b4f3b6bf640c7fc5c194790..7623378bdb0aaaffd1a67ed46d773d6472630e84 100644 (file)
@@ -32,7 +32,7 @@ class api_v3_TagTest extends CiviUnitTestCase {
 
   protected $tagID;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->tag = $this->tagCreate();
index 0010e84542d4c778de655dd67b4e6cd5754148a1..0167412e07e3049040d494f244f567e853ccf756 100644 (file)
@@ -31,7 +31,7 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase {
   protected $halfFinancialAccId;
   protected $halfFinancialTypeId;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->_individualId = $this->individualCreate();
     $this->_orgId = $this->organizationCreate(NULL);
index 3e667cce4fbc2c82f7e183e9874aa1d87df53dbb..a65cd8d5a72f14397996a84078f8c3051313c6af 100644 (file)
@@ -37,7 +37,7 @@ class api_v3_UFFieldTest extends CiviUnitTestCase {
    *
    * @throws \Exception
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->quickCleanup(
       [
index f6a52f25f97d3d836e48d0b226d78c3e1f93f895..dd3c5dcb7442b23f3ffb4e00d7f29f450c2cd50d 100644 (file)
@@ -27,7 +27,7 @@ class api_v3_UFGroupTest extends CiviUnitTestCase {
   protected $_groupId;
   protected $params;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->_groupId = $this->groupCreate();
     $this->_contactId = $this->individualCreate();
index a82392a76100fd1ad5015ba5b368badee2d154d1..f7a76870f7df8c95e58d1da6e3db161e1dcfe924 100644 (file)
@@ -25,7 +25,7 @@ class api_v3_UFJoinTest extends CiviUnitTestCase {
   protected $_ufFieldId;
   protected $_contactId = 69;
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     //  Truncate the tables
     $this->quickCleanup(
index 8bb74325f88a90b3af9e65fd97e022b88c5c1528..e0671893d00247a6c2a848a5e884634d137796ec 100644 (file)
@@ -26,7 +26,7 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
   protected $_contactId;
   protected $_params = [];
 
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->quickCleanup(
       [
index aeb70e0a7d18ebcfca77126081475dc611232551..7d819181b39a2c44d33a03a09b49914e2efd9d48 100644 (file)
@@ -24,7 +24,7 @@ class api_v3_UserTest extends CiviUnitTestCase {
 
   public $DBResetRequired = FALSE;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->contactID = $this->createLoggedInUser();
     $this->params = [
index 3e1d5b27f5cba1e38a98ae1d02e761aefe147936..ffc68eb560f38c350f565c4fe2cd3189805608cd 100644 (file)
@@ -28,7 +28,7 @@ class api_v3_UtilsTest extends CiviUnitTestCase {
    *
    * This method is called before a test is executed.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->useTransaction(TRUE);
   }
index 9512744fef76ba46138deb0fe6a2010b831b7ee7..473f397ccac75bd9272b959baad5d6da1043c3ab 100644 (file)
@@ -20,7 +20,7 @@ class api_v3_ValidateTest extends CiviUnitTestCase {
   /**
    * This method is called before a test is executed.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
   }
 
index 638f10efdfdde783b46bebc783b402734aa3b8bb..b2bc8f670e59303766d71ba46c2326900b7e6715 100644 (file)
@@ -24,7 +24,7 @@ class api_v3_WebsiteTest extends CiviUnitTestCase {
 
   public $DBResetRequired = FALSE;
 
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
     $this->useTransaction();