Refine alignment of old/new token lists
authorTim Otten <totten@civicrm.org>
Fri, 12 Nov 2021 04:08:16 +0000 (20:08 -0800)
committerTim Otten <totten@civicrm.org>
Fri, 12 Nov 2021 04:08:16 +0000 (20:08 -0800)
commite3a34ebde9c77d9e960354dd2030d613cd3362cc
tree2501da87c7f6e5fc250419fcda265cc193031c86
parentfa75f0642b94e1cedc5dae8fa99d4e92a71a8df2
Refine alignment of old/new token lists

The prior commit means that `$context['participantId']` will activate `{event.*}` tokens - in contexts
that use `TokenProcessor`. And the `TokenProcessor` is *somewhat* matched to the older functions.

This twiddles the match-up:

* Provide continuity for the deprecated `CRM_Core_SelectValues::participantTokens()` - so it still
  only returns `{participant.*}` tokens. Borrow the technique which excludes `{domain.*}` tokens.
  This should ensure better continuity for any callers that actually use `CRM_Utils_Token`.

* Update the assertions for the `TokenProcessor` to show that the `{event.*}` tokens are presented in
  participant-related contexts.
CRM/Core/SelectValues.php
tests/phpunit/CRM/Utils/TokenConsistencyTest.php