From 84060348e6831f43895860b9a76574587dc2efed Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 7 Nov 2019 06:44:21 +1100 Subject: [PATCH] Fix Smarty Syntax in payment_or_refund_notification_text template and update unit tests to match the change in langauge in the templates --- .../CRM/Contribute/Form/AdditionalPaymentTest.php | 10 +++++----- tests/phpunit/api/v3/PaymentTest.php | 10 +++++----- .../payment_or_refund_notification_text.tpl | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php b/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php index 7c3e9e40cd..5078bdda2f 100644 --- a/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php +++ b/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php @@ -149,7 +149,7 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase { 'From: site@something.com', 'Dear Anthony,', 'Payment Details', - 'Total Fees: $ 100.00', + 'Total Amount: $ 100.00', 'This Payment Amount: $ 70.00', 'Balance Owed: $ 0.00 ', 'Billing Name and Address', @@ -238,8 +238,8 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase { $mut->assertSubjects(['Payment Receipt - Mr. Anthony Anderson II']); $mut->checkMailLog([ 'Dear Anthony,', - 'A payment has been received', - 'Total Fees: $ 100.00', + 'Below you will find a receipt for this payment.', + 'Total Amount: $ 100.00', 'This Payment Amount: $ 50.00', 'Balance Owed: $ 20.00 ', 'Paid By: Check', @@ -268,8 +268,8 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase { $this->checkResults([100], 1); $mut->checkMailLog([ - 'A payment has been received', - 'Total Fees: $ 100.00', + 'Below you will find a receipt for this payment.', + 'Total Amount: $ 100.00', 'This Payment Amount: $ 100.00', 'Balance Owed: $ 0.00 ', 'Paid By: Credit Card', diff --git a/tests/phpunit/api/v3/PaymentTest.php b/tests/phpunit/api/v3/PaymentTest.php index 66de216a2e..74027bfa61 100644 --- a/tests/phpunit/api/v3/PaymentTest.php +++ b/tests/phpunit/api/v3/PaymentTest.php @@ -183,7 +183,7 @@ class api_v3_PaymentTest extends CiviUnitTestCase { $mut->checkMailLog([ 'From: "FIXME" ', 'Dear Anthony,', - 'Total Fees: $ 300.00', + 'Total Amount: $ 300.00', 'This Payment Amount: $ 50.00', //150 was paid in the 1st payment. 'Balance Owed: $ 100.00', @@ -221,8 +221,8 @@ class api_v3_PaymentTest extends CiviUnitTestCase { $mut->checkMailLog([ 'From: "FIXME" ', 'Dear Anthony,', - 'A payment has been received.', - 'Total Fees: $ 300.00', + 'Below you will find a receipt for this payment.', + 'Total Amount: $ 300.00', 'This Payment Amount: $ 150.00', 'Balance Owed: $ 0.00', 'Thank you for completing this payment.', @@ -273,12 +273,12 @@ class api_v3_PaymentTest extends CiviUnitTestCase { $mut->checkMailLog([ 'Dear Anthony,', 'A refund has been issued based on changes in your registration selections.', - 'Total Fees: $ 300' . $decimalSeparator . '00', + 'Total Amount: $ 300' . $decimalSeparator . '00', 'Refund Amount: $ -30' . $decimalSeparator . '00', 'Event Information and Location', 'Paid By: Check', 'Transaction Date: November 13th, 2018 12:01 PM', - 'You Paid: $ 170' . $decimalSeparator . '00', + 'Totally Paid: $ 170' . $decimalSeparator . '00', ]); $mut->stop(); $mut->clearMessages(); diff --git a/xml/templates/message_templates/payment_or_refund_notification_text.tpl b/xml/templates/message_templates/payment_or_refund_notification_text.tpl index 396573290a..0a4688e1f2 100644 --- a/xml/templates/message_templates/payment_or_refund_notification_text.tpl +++ b/xml/templates/message_templates/payment_or_refund_notification_text.tpl @@ -27,7 +27,7 @@ =============================================================================== {ts}This Payment Amount{/ts}: {$paymentAmount|crmMoney} ------------------------------------------------------------------------------------ - +{/if} {if $receive_date} {ts}Transaction Date{/ts}: {$receive_date|crmDate} {/if} -- 2.25.1