From 1774b40a8fa597a8d1cf803838853f62394ce85c Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 14 Mar 2016 14:26:52 -0700 Subject: [PATCH] CRM_Contribute_ActionMapping_ByTypeTest - Check that contribution tokens work --- .../CRM/Contribute/ActionMapping/ByTypeTest.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/ActionMapping/ByTypeTest.php b/tests/phpunit/CRM/Contribute/ActionMapping/ByTypeTest.php index f66c52ebe3..52cf4ee0de 100644 --- a/tests/phpunit/CRM/Contribute/ActionMapping/ByTypeTest.php +++ b/tests/phpunit/CRM/Contribute/ActionMapping/ByTypeTest.php @@ -48,12 +48,12 @@ class CRM_Contribute_ActionMapping_ByTypeTest extends \Civi\ActionSchedule\Abstr $cs[] = array( '2015-02-01 00:00:00', - 'addAliceDues addBobDonation scheduleForDues startOnTime useHelloFirstName', + 'addAliceDues addBobDonation scheduleForDues startOnTime useHelloFirstNameStatus', array( array( 'time' => '2015-02-01 00:00:00', 'to' => array('alice@example.org'), - 'subject' => '/Hello, Alice.*via subject/', + 'subject' => '/Hello, Alice. @Completed.*via subject/', ), ), ); @@ -183,4 +183,10 @@ class CRM_Contribute_ActionMapping_ByTypeTest extends \Civi\ActionSchedule\Abstr $this->schedule->recipient_listing = CRM_Utils_Array::implodePadded(array(3)); } + public function useHelloFirstNameStatus() { + $this->schedule->subject = 'Hello, {contact.first_name}. @{contribution.status}. (via subject)'; + $this->schedule->body_html = '

Hello, {contact.first_name}. @{contribution.status}. (via body_html)

'; + $this->schedule->body_text = 'Hello, {contact.first_name}. @{contribution.status}. (via body_text)'; + } + } -- 2.25.1