From: Eileen McNaughton Date: Mon, 6 Feb 2023 07:17:14 +0000 (+1300) Subject: Fully deprecate CRM_Core_SelectValues::eventTokens() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=198e3b98da8ff77cd1d30b7a2cbc851f4f213178;p=civicrm-core.git Fully deprecate CRM_Core_SelectValues::eventTokens() --- diff --git a/CRM/Core/SelectValues.php b/CRM/Core/SelectValues.php index e42cacaca4..7f05ab83ff 100644 --- a/CRM/Core/SelectValues.php +++ b/CRM/Core/SelectValues.php @@ -564,6 +564,7 @@ class CRM_Core_SelectValues { * @return array */ public static function eventTokens(): array { + CRM_Core_Error::deprecatedFunctionWarning('token processor'); $tokenProcessor = new TokenProcessor(Civi::dispatcher(), ['schema' => ['eventId']]); $allTokens = $tokenProcessor->listTokens(); foreach (array_keys($allTokens) as $token) { diff --git a/tests/phpunit/CRM/Utils/TokenConsistencyTest.php b/tests/phpunit/CRM/Utils/TokenConsistencyTest.php index 0840d6cca9..255eb00744 100644 --- a/tests/phpunit/CRM/Utils/TokenConsistencyTest.php +++ b/tests/phpunit/CRM/Utils/TokenConsistencyTest.php @@ -811,8 +811,7 @@ United States', $tokenProcessor->getRow(0)->render('message')); $mut = new CiviMailUtils($this); $this->setupParticipantScheduledReminder(); - $tokens = CRM_Core_SelectValues::eventTokens(); - $this->assertEquals(array_merge($this->getEventTokens()), $tokens); + $tokens = array_merge($this->getEventTokens()); $tokenProcessor = new TokenProcessor(\Civi::dispatcher(), [ 'controller' => __CLASS__, 'smarty' => FALSE,