One more instance of CRM_Utils_String::endsWith in test
authorFrancis Whittle <francis@agileware.com.au>
Tue, 31 Jan 2017 04:08:00 +0000 (15:08 +1100)
committerAgileware Support <support@agileware.com.au>
Tue, 31 Jan 2017 04:08:00 +0000 (15:08 +1100)
tests/phpunit/CRM/Member/Form/Task/PDFLetterCommonTest.php

index 33ca159d8cf530242e70e7663a8973fcfc6d0b49..274db2120c85b473508277fd1cefa83e5b43f125 100644 (file)
@@ -77,7 +77,7 @@ class CRM_Member_Form_Task_PDFLetterCommonTest extends CiviUnitTestCase {
 
       // Form an expected array replacing tokens for each contact.
       foreach ($tokens as $key => $val) {
-        if (CRM_Utils_String::endsWith($val, '_date')) {
+        if (preg_match('/_date$/', $val)) {
           $formattedDate = CRM_Utils_Date::customFormat($params[$val]);
           $expected[$contactId][$val] = "{$key} - {$formattedDate}";
         }