CRM_Contribute_ActionMapping_ByTypeTest - Check that contribution tokens work
authorTim Otten <totten@civicrm.org>
Mon, 14 Mar 2016 21:26:52 +0000 (14:26 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 14 Mar 2016 21:26:52 +0000 (14:26 -0700)
tests/phpunit/CRM/Contribute/ActionMapping/ByTypeTest.php

index f66c52ebe3381537f4178a0d39ca982f283bf487..52cf4ee0de09a370d6519d21c358bb3fdb25717e 100644 (file)
@@ -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 = '<p>Hello, {contact.first_name}. @{contribution.status}. (via body_html)</p>';
+    $this->schedule->body_text = 'Hello, {contact.first_name}. @{contribution.status}. (via body_text)';
+  }
+
 }