From f8095023ccc53487e0c6aa9996b75bd54310096e Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 16 Mar 2023 22:54:04 -0700 Subject: [PATCH] Normalize order of setUp()/useTransaction() - batch 3 --- tests/phpunit/CRM/Utils/API/MatchOptionTest.php | 2 +- tests/phpunit/CRM/Utils/ArrayTest.php | 2 +- tests/phpunit/CRM/Utils/AutoCleanTest.php | 2 +- tests/phpunit/CRM/Utils/Check/Component/EnvTest.php | 2 +- tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php | 2 +- tests/phpunit/CRM/Utils/ColorTest.php | 2 +- tests/phpunit/CRM/Utils/DateTest.php | 2 +- tests/phpunit/CRM/Utils/HTMLTest.php | 2 +- tests/phpunit/CRM/Utils/HookTest.php | 2 +- tests/phpunit/CRM/Utils/HtmlToTextTest.php | 2 +- tests/phpunit/CRM/Utils/HttpClientTest.php | 2 +- tests/phpunit/CRM/Utils/ICalendarTest.php | 2 +- tests/phpunit/CRM/Utils/JSTest.php | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/phpunit/CRM/Utils/API/MatchOptionTest.php b/tests/phpunit/CRM/Utils/API/MatchOptionTest.php index c622abe1a6..32bc748f86 100644 --- a/tests/phpunit/CRM/Utils/API/MatchOptionTest.php +++ b/tests/phpunit/CRM/Utils/API/MatchOptionTest.php @@ -12,8 +12,8 @@ class CRM_Utils_API_MatchOptionTest extends CiviUnitTestCase { public $noise; public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); $this->assertDBQuery(0, "SELECT count(*) FROM civicrm_contact WHERE first_name='Jeffrey' and last_name='Lebowski'"); // Create noise to ensure we don't accidentally/coincidentally match the first record diff --git a/tests/phpunit/CRM/Utils/ArrayTest.php b/tests/phpunit/CRM/Utils/ArrayTest.php index d76f3dce3e..19df34d5d3 100644 --- a/tests/phpunit/CRM/Utils/ArrayTest.php +++ b/tests/phpunit/CRM/Utils/ArrayTest.php @@ -10,8 +10,8 @@ class CRM_Utils_ArrayTest extends CiviUnitTestCase { * Set up for tests. */ public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } public function testAsColumns() { diff --git a/tests/phpunit/CRM/Utils/AutoCleanTest.php b/tests/phpunit/CRM/Utils/AutoCleanTest.php index 6cfc20f62d..8c65827e5a 100644 --- a/tests/phpunit/CRM/Utils/AutoCleanTest.php +++ b/tests/phpunit/CRM/Utils/AutoCleanTest.php @@ -9,8 +9,8 @@ class CRM_Utils_AutoCleanTest extends CiviUnitTestCase { public $foo; protected function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } public function testAutoclean() { diff --git a/tests/phpunit/CRM/Utils/Check/Component/EnvTest.php b/tests/phpunit/CRM/Utils/Check/Component/EnvTest.php index 0a7d17634a..67f4438f9c 100644 --- a/tests/phpunit/CRM/Utils/Check/Component/EnvTest.php +++ b/tests/phpunit/CRM/Utils/Check/Component/EnvTest.php @@ -9,8 +9,8 @@ class CRM_Utils_Check_Component_EnvTest extends CiviUnitTestCase { public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } /** diff --git a/tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php b/tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php index e361b91d59..1b1a77f59f 100644 --- a/tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php +++ b/tests/phpunit/CRM/Utils/Check/Component/OptionGroupsTest.php @@ -9,8 +9,8 @@ class CRM_Utils_Check_Component_OptionGroupsTest extends CiviUnitTestCase { public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } public function testCheckOptionGroupValues() { diff --git a/tests/phpunit/CRM/Utils/ColorTest.php b/tests/phpunit/CRM/Utils/ColorTest.php index 794194fafb..ba94406ad8 100644 --- a/tests/phpunit/CRM/Utils/ColorTest.php +++ b/tests/phpunit/CRM/Utils/ColorTest.php @@ -7,8 +7,8 @@ class CRM_Utils_ColorTest extends CiviUnitTestCase { public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } /** diff --git a/tests/phpunit/CRM/Utils/DateTest.php b/tests/phpunit/CRM/Utils/DateTest.php index 69db971e49..c17368e4b8 100644 --- a/tests/phpunit/CRM/Utils/DateTest.php +++ b/tests/phpunit/CRM/Utils/DateTest.php @@ -30,8 +30,8 @@ class CRM_Utils_DateTest extends CiviUnitTestCase { * Set up for tests. */ public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } /** diff --git a/tests/phpunit/CRM/Utils/HTMLTest.php b/tests/phpunit/CRM/Utils/HTMLTest.php index 8affd0a5c7..7885e492f9 100644 --- a/tests/phpunit/CRM/Utils/HTMLTest.php +++ b/tests/phpunit/CRM/Utils/HTMLTest.php @@ -16,8 +16,8 @@ class CRM_Utils_HTMLTest extends CiviUnitTestCase { public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } /** diff --git a/tests/phpunit/CRM/Utils/HookTest.php b/tests/phpunit/CRM/Utils/HookTest.php index a0c594921b..a74e543bfc 100644 --- a/tests/phpunit/CRM/Utils/HookTest.php +++ b/tests/phpunit/CRM/Utils/HookTest.php @@ -27,8 +27,8 @@ class CRM_Utils_HookTest extends CiviUnitTestCase { public $hook; public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); $this->fakeModules = [ 'hooktesta', 'hooktestb', diff --git a/tests/phpunit/CRM/Utils/HtmlToTextTest.php b/tests/phpunit/CRM/Utils/HtmlToTextTest.php index 67c7881d0d..817f49a721 100644 --- a/tests/phpunit/CRM/Utils/HtmlToTextTest.php +++ b/tests/phpunit/CRM/Utils/HtmlToTextTest.php @@ -7,8 +7,8 @@ class CRM_Utils_HtmlToTextTest extends CiviUnitTestCase { public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } /** diff --git a/tests/phpunit/CRM/Utils/HttpClientTest.php b/tests/phpunit/CRM/Utils/HttpClientTest.php index 2890e87d55..70a128d840 100644 --- a/tests/phpunit/CRM/Utils/HttpClientTest.php +++ b/tests/phpunit/CRM/Utils/HttpClientTest.php @@ -25,8 +25,8 @@ class CRM_Utils_HttpClientTest extends CiviUnitTestCase { protected $client; public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); $this->tmpFile = $this->createTempDir() . '/example.txt'; diff --git a/tests/phpunit/CRM/Utils/ICalendarTest.php b/tests/phpunit/CRM/Utils/ICalendarTest.php index a12ea46d85..a4e7017aaf 100644 --- a/tests/phpunit/CRM/Utils/ICalendarTest.php +++ b/tests/phpunit/CRM/Utils/ICalendarTest.php @@ -16,8 +16,8 @@ class CRM_Utils_ICalendarTest extends CiviUnitTestCase { public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } /** diff --git a/tests/phpunit/CRM/Utils/JSTest.php b/tests/phpunit/CRM/Utils/JSTest.php index 199e4939c5..4e4fdafeeb 100644 --- a/tests/phpunit/CRM/Utils/JSTest.php +++ b/tests/phpunit/CRM/Utils/JSTest.php @@ -19,8 +19,8 @@ class CRM_Utils_JSTest extends CiviUnitTestCase { * Set up for tests. */ public function setUp(): void { - $this->useTransaction(); parent::setUp(); + $this->useTransaction(); } /** -- 2.25.1