Fully deprecate CRM_Core_SelectValues::eventTokens()
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 6 Feb 2023 07:17:14 +0000 (20:17 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 6 Feb 2023 07:21:14 +0000 (20:21 +1300)
CRM/Core/SelectValues.php
tests/phpunit/CRM/Utils/TokenConsistencyTest.php

index e42cacaca4d27ad9db4aba3f3c7f8ee50d57d832..7f05ab83ff4caf35ddec3f239a2c154050853958 100644 (file)
@@ -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) {
index 0840d6cca99b12567f1396244993ef465036b160..255eb0074431af4a72aa2e9170d6893ff787a456 100644 (file)
@@ -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,