From ff4b655a9ecf1882db0a201b0bd5a9221bb79805 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Thu, 26 Jan 2023 19:33:35 +0000 Subject: [PATCH] [REF][PHP8.2] Refactor CRM_Case_BAO_CaseTest to use const --- tests/phpunit/CRM/Case/BAO/CaseTest.php | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/phpunit/CRM/Case/BAO/CaseTest.php b/tests/phpunit/CRM/Case/BAO/CaseTest.php index c1b852c1ff..835fdc77ca 100644 --- a/tests/phpunit/CRM/Case/BAO/CaseTest.php +++ b/tests/phpunit/CRM/Case/BAO/CaseTest.php @@ -6,28 +6,28 @@ */ class CRM_Case_BAO_CaseTest extends CiviUnitTestCase { + const TABLES_TO_TRUNCATE = [ + 'civicrm_activity', + 'civicrm_group_contact', + 'civicrm_contact', + 'civicrm_custom_group', + 'civicrm_custom_field', + 'civicrm_case', + 'civicrm_case_contact', + 'civicrm_case_activity', + 'civicrm_case_type', + 'civicrm_file', + 'civicrm_entity_file', + 'civicrm_activity_contact', + 'civicrm_managed', + 'civicrm_relationship', + 'civicrm_relationship_type', + ]; + public function setUp(): void { parent::setUp(); - $this->tablesToTruncate = [ - 'civicrm_activity', - 'civicrm_group_contact', - 'civicrm_contact', - 'civicrm_custom_group', - 'civicrm_custom_field', - 'civicrm_case', - 'civicrm_case_contact', - 'civicrm_case_activity', - 'civicrm_case_type', - 'civicrm_file', - 'civicrm_entity_file', - 'civicrm_activity_contact', - 'civicrm_managed', - 'civicrm_relationship', - 'civicrm_relationship_type', - ]; - - $this->quickCleanup($this->tablesToTruncate); + $this->quickCleanup(self::TABLES_TO_TRUNCATE); $this->loadAllFixtures(); @@ -60,7 +60,7 @@ class CRM_Case_BAO_CaseTest extends CiviUnitTestCase { } protected function tearDown(): void { - $this->quickCleanup($this->tablesToTruncate, TRUE); + $this->quickCleanup(self::TABLES_TO_TRUNCATE, TRUE); parent::tearDown(); } -- 2.25.1