Normalize order of setUp()/useTransaction() - batch 2
authorTim Otten <totten@civicrm.org>
Fri, 17 Mar 2023 05:52:48 +0000 (22:52 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 17 Mar 2023 06:08:10 +0000 (23:08 -0700)
tests/phpunit/CRM/Activity/Form/Task/PDFTest.php
tests/phpunit/CRM/Contact/BAO/RelationshipCacheTest.php
tests/phpunit/CRM/Contact/Page/AjaxTest.php
tests/phpunit/CRM/Core/ManagedEntitiesTest.php
tests/phpunit/CRM/Event/Form/ParticipantTest.php
tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php
tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php
tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php
tests/phpunit/CRM/Mailing/MailStoreTest.php
tests/phpunit/CRM/Mailing/TokensTest.php

index 6243408c3f5fb248123dfc1be9adee87ca1db74f..d4bad18f688c4b0c6fee86c7cd5cb82d3d3f0302 100644 (file)
@@ -12,8 +12,8 @@ class CRM_Activity_Form_Task_PDFTest extends CiviUnitTestCase {
    * Set up for tests.
    */
   public function setUp(): void {
-    $this->useTransaction();
     parent::setUp();
+    $this->useTransaction();
   }
 
   /**
index 44cd3c53ee090a84f1564a77e35d3ae4f48ded5e..006d39dfe5fae45f3fc3a1d483b6008f213902db 100644 (file)
@@ -18,8 +18,8 @@
 class CRM_Contact_BAO_RelationshipCacheTest extends CiviUnitTestCase {
 
   protected function setUp(): void {
-    $this->useTransaction(TRUE);
     parent::setUp();
+    $this->useTransaction(TRUE);
   }
 
   /**
index 2f14700b8f67786fdad34902d0715d351193240d..aec798dd940e4996a4813f1a3b402ea27bcb51b7 100644 (file)
@@ -15,8 +15,8 @@ class CRM_Contact_Page_AjaxTest extends CiviUnitTestCase {
   protected $originalRequest = [];
 
   public function setUp(): void {
-    $this->useTransaction(TRUE);
     parent::setUp();
+    $this->useTransaction(TRUE);
     $this->originalRequest = $_REQUEST;
   }
 
index a05526f2ba9908acc36668b33a7694fd596f226a..d2bdbd81ae0d830221307f0b4cee84ed5ee90aa1 100644 (file)
@@ -23,8 +23,8 @@ class CRM_Core_ManagedEntitiesTest extends CiviUnitTestCase {
   protected $fixtures;
 
   public function setUp(): void {
-    $this->useTransaction(TRUE);
     parent::setUp();
+    $this->useTransaction(TRUE);
     $this->modules = [
       'one' => new CRM_Core_Module('com.example.one', TRUE),
       'two' => new CRM_Core_Module('com.example.two', TRUE),
index c75195df22a44163ff64900e48406e001188ceb2..2bda22c7ddbeceb0333009c44b6751c093f7a45b 100644 (file)
@@ -21,8 +21,8 @@ class CRM_Event_Form_ParticipantTest extends CiviUnitTestCase {
   protected $fromEmailAddressOptions = [];
 
   public function setUp(): void {
-    $this->useTransaction();
     parent::setUp();
+    $this->useTransaction();
   }
 
   /**
index 5ee4309724762b16c55ea58442680b8cb76c2bee..a9e3d49905434a73fb9004df13a27360ba5dff3e 100644 (file)
@@ -12,8 +12,8 @@ class CRM_Event_Form_Registration_ConfirmTest extends CiviUnitTestCase {
   use CRMTraits_Profile_ProfileTrait;
 
   public function setUp(): void {
-    $this->useTransaction();
     parent::setUp();
+    $this->useTransaction();
   }
 
   /**
index 699d07b6c7656814dc116744d701a2c8ebe9ce84..9811c2af9d37c29a94421df92ce9399fe4f971f5 100644 (file)
@@ -19,8 +19,8 @@ use Civi\Api4\FinancialType;
 class CRM_Financial_BAO_FinancialAccountTest extends CiviUnitTestCase {
 
   public function setUp(): void {
-    $this->useTransaction(TRUE);
     parent::setUp();
+    $this->useTransaction(TRUE);
     $this->organizationCreate();
   }
 
index d3b8677a829cafba25537d3ecd8851624e586c06..d4e74e96df24e2524e4574e27f57634cd9766539 100644 (file)
@@ -36,8 +36,8 @@ abstract class CRM_Mailing_BaseMailingSystemTest extends CiviUnitTestCase {
   private $_mut;
 
   public function setUp(): void {
-    $this->useTransaction();
     parent::setUp();
+    $this->useTransaction();
     CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0;
 
     $this->_groupID = $this->groupCreate();
index ae164f2b1c1383e2a2863aee40f6520b180b05e0..4472ac2edc2a8175333568a4cafc62c6766898ec 100644 (file)
@@ -8,8 +8,8 @@ class CRM_Mailing_MailStoreTest extends \CiviUnitTestCase {
   protected $workDir;
 
   public function setUp(): void {
-    $this->useTransaction(TRUE);
     parent::setUp();
+    $this->useTransaction(TRUE);
     $this->workDir = tempnam(sys_get_temp_dir(), 'mailstoretest');
     @unlink($this->workDir);
   }
index 4a5bdb7f4cb879f616081bde0049020b664f7c7a..8734ee90ffe674ebd6b65e77f6193d0064408faa 100644 (file)
@@ -6,8 +6,8 @@
 class CRM_Mailing_TokensTest extends \CiviUnitTestCase {
 
   protected function setUp(): void {
-    $this->useTransaction();
     parent::setUp();
+    $this->useTransaction();
     $this->callAPISuccess('mail_settings', 'get',
       ['api.mail_settings.create' => ['domain' => 'chaos.org']]);
   }