From 641bb717465caa026e3a8d328500feaad131683b Mon Sep 17 00:00:00 2001 From: JKingsnorth Date: Mon, 5 Aug 2019 12:30:08 +0100 Subject: [PATCH] Add test for custom token compatibility --- tests/phpunit/CRM/Utils/TokenTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/phpunit/CRM/Utils/TokenTest.php b/tests/phpunit/CRM/Utils/TokenTest.php index c42ca966f0..9366181288 100644 --- a/tests/phpunit/CRM/Utils/TokenTest.php +++ b/tests/phpunit/CRM/Utils/TokenTest.php @@ -78,6 +78,11 @@ class CRM_Utils_TokenTest extends CiviUnitTestCase { $escapeSmarty = TRUE; CRM_Utils_Token::replaceGreetingTokens($tokenString, $contactDetails, $contactId, $className, $escapeSmarty); $this->assertEquals($tokenString, 'First Name: Morticia Last Name: Addams Birth Date: Prefix: Ms. Suffix: '); + + // Test compatibility with custom tokens (#14943) + $tokenString = 'Custom {custom.custom}'; + CRM_Utils_Token::replaceGreetingTokens($tokenString, $contactDetails, $contactId, $className, $escapeSmarty); + $this->assertEquals($tokenString, 'Custom '); } /** -- 2.25.1