Merge pull request #23701 from eileenmcnaughton/unused
[civicrm-core.git] / CRM / Contribute / WorkflowMessage / RecurringEdit / BarbPending.ex.php
1 <?php
2
3 class CRM_Contribute_WorkflowMessage_RecurringEdit_BarbPending extends \Civi\WorkflowMessage\WorkflowMessageExample {
4
5 public function getExamples(): iterable {
6 yield [
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'],
11 ];
12 }
13
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);
20
21 $example['asserts'] = [
22 'default' => [
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/'],
25 ],
26 ];
27 }
28
29 }