3 class CRM_Contribute_WorkflowMessage_RecurringEdit_BarbPending
extends \Civi\WorkflowMessage\WorkflowMessageExample
{
5 public function getExamples(): iterable
{
7 'name' => "workflow/{$this->wfName}/{$this->exName}",
8 // This title is not very clear. When we have some more examples to compare against, feel free to change/clarify.
9 'title' => ts('Recurring Edit: Barbara, Pending'),
10 'tags' => ['preview'],
14 public function build(array &$example): void
{
15 $msg = (new CRM_Contribute_WorkflowMessage_RecurringEdit())
16 ->setReceiptFromEmail('info@example.com')
17 ->setContact(\Civi\Test
::example('entity/Contact/Barb'))
18 ->setContributionRecur(\Civi\Test
::example('entity/ContributionRecur/Euro5990/pending'));
19 $example['data'] = $this->toArray($msg);
21 $example['asserts'] = [
23 ['for' => 'subject', 'regex' => '/Recurring Contribution Update.*Barb/'],
24 ['for' => 'text', 'regex' => '/Recurring contribution is for €5,990.99, every 2 year.s. for 24 installments/'],