From: Tim Otten Date: Fri, 17 Mar 2023 05:52:48 +0000 (-0700) Subject: Normalize order of setUp()/useTransaction() - batch 2 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c5429678b666f9b80fe503ee34a81ce83ec5172d;p=civicrm-core.git Normalize order of setUp()/useTransaction() - batch 2 --- diff --git a/tests/phpunit/CRM/Activity/Form/Task/PDFTest.php b/tests/phpunit/CRM/Activity/Form/Task/PDFTest.php index 6243408c3f..d4bad18f68 100644 --- a/tests/phpunit/CRM/Activity/Form/Task/PDFTest.php +++ b/tests/phpunit/CRM/Activity/Form/Task/PDFTest.php @@ -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(); } /** diff --git a/tests/phpunit/CRM/Contact/BAO/RelationshipCacheTest.php b/tests/phpunit/CRM/Contact/BAO/RelationshipCacheTest.php index 44cd3c53ee..006d39dfe5 100644 --- a/tests/phpunit/CRM/Contact/BAO/RelationshipCacheTest.php +++ b/tests/phpunit/CRM/Contact/BAO/RelationshipCacheTest.php @@ -18,8 +18,8 @@ class CRM_Contact_BAO_RelationshipCacheTest extends CiviUnitTestCase { protected function setUp(): void { - $this->useTransaction(TRUE); parent::setUp(); + $this->useTransaction(TRUE); } /** diff --git a/tests/phpunit/CRM/Contact/Page/AjaxTest.php b/tests/phpunit/CRM/Contact/Page/AjaxTest.php index 2f14700b8f..aec798dd94 100644 --- a/tests/phpunit/CRM/Contact/Page/AjaxTest.php +++ b/tests/phpunit/CRM/Contact/Page/AjaxTest.php @@ -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; } diff --git a/tests/phpunit/CRM/Core/ManagedEntitiesTest.php b/tests/phpunit/CRM/Core/ManagedEntitiesTest.php index a05526f2ba..d2bdbd81ae 100644 --- a/tests/phpunit/CRM/Core/ManagedEntitiesTest.php +++ b/tests/phpunit/CRM/Core/ManagedEntitiesTest.php @@ -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), diff --git a/tests/phpunit/CRM/Event/Form/ParticipantTest.php b/tests/phpunit/CRM/Event/Form/ParticipantTest.php index c75195df22..2bda22c7dd 100644 --- a/tests/phpunit/CRM/Event/Form/ParticipantTest.php +++ b/tests/phpunit/CRM/Event/Form/ParticipantTest.php @@ -21,8 +21,8 @@ class CRM_Event_Form_ParticipantTest extends CiviUnitTestCase { protected $fromEmailAddressOptions = []; public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } /** diff --git a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php index 5ee4309724..a9e3d49905 100644 --- a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php +++ b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php @@ -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(); } /** diff --git a/tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php b/tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php index 699d07b6c7..9811c2af9d 100644 --- a/tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php +++ b/tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php @@ -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(); } diff --git a/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php b/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php index d3b8677a82..d4e74e96df 100644 --- a/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php +++ b/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php @@ -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(); diff --git a/tests/phpunit/CRM/Mailing/MailStoreTest.php b/tests/phpunit/CRM/Mailing/MailStoreTest.php index ae164f2b1c..4472ac2edc 100644 --- a/tests/phpunit/CRM/Mailing/MailStoreTest.php +++ b/tests/phpunit/CRM/Mailing/MailStoreTest.php @@ -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); } diff --git a/tests/phpunit/CRM/Mailing/TokensTest.php b/tests/phpunit/CRM/Mailing/TokensTest.php index 4a5bdb7f4c..8734ee90ff 100644 --- a/tests/phpunit/CRM/Mailing/TokensTest.php +++ b/tests/phpunit/CRM/Mailing/TokensTest.php @@ -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']]); }