From c27e308dc02a0002737b730cac9560c2d372c9b1 Mon Sep 17 00:00:00 2001 From: colemanw Date: Thu, 24 Aug 2023 13:50:01 -0400 Subject: [PATCH] REF/tests - Simplify inline conditionals with Elvis --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 973a120a5f..08b5e7eadf 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -1430,7 +1430,7 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase { public function entityCustomGroupWithSingleFieldCreate($function, $filename): array { $params = ['title' => $function]; $entity = substr(basename($filename), 0, strlen(basename($filename)) - 8); - $params['extends'] = $entity ? $entity : 'Contact'; + $params['extends'] = $entity ?: 'Contact'; $customGroup = $this->customGroupCreate($params); $customField = $this->customFieldCreate(['custom_group_id' => $customGroup['id'], 'label' => $function]); CRM_Core_PseudoConstant::flush(); @@ -1453,7 +1453,7 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase { public function entityCustomGroupWithSingleStringMultiSelectFieldCreate($function, $filename) { $params = ['title' => $function]; $entity = substr(basename($filename), 0, strlen(basename($filename)) - 8); - $params['extends'] = $entity ? $entity : 'Contact'; + $params['extends'] = $entity ?: 'Contact'; $customGroup = $this->customGroupCreate($params); $customField = $this->customFieldCreate(['custom_group_id' => $customGroup['id'], 'label' => $function, 'html_type' => 'Multi-Select', 'default_value' => 1]); CRM_Core_PseudoConstant::flush(); -- 2.25.1