'{participant.fee_label}' => 'Fee Label',
'{participant.default_role_id}' => 'Default Role',
'{participant.template_title}' => 'Event Template Title',
- '{participant.currency}' => 'Currency',
- '{participant.participant_note}' => 'Participant Note',
];
$customFields = CRM_Core_BAO_CustomField::getFields('Participant');
public function replaceTokenInPrintLabel(string $old, string $new): void {
$oldToken = '{' . $old . '}';
$newToken = '{' . $new . '}';
- CRM_Core_DAO::executeQuery("UPDATE civicrm_action_schedule
+ CRM_Core_DAO::executeQuery("UPDATE civicrm_print_label
SET
data = REPLACE(data, '$oldToken', '$newToken')
");
use CRMTraits_Custom_CustomDataTrait;
+ public function tearDown(): void {
+ $this->quickCleanup(['civicrm_participant', 'civicrm_print_label'], TRUE);
+ parent::tearDown();
+ }
+
/**
* Test the the submit function on the event participant submit function.
*/
$badgeLayout = PrintLabel::get()->addSelect('data')->execute()->first();
$values = [
- 'data' => array_merge($badgeLayout['data'], ['token' => [], 'font_name' => [''], 'font_size' => [], 'text_alignment' => []])
+ 'data' => array_merge($badgeLayout['data'], ['token' => [], 'font_name' => [''], 'font_size' => [], 'text_alignment' => []]),
];
foreach (array_keys($this->getAvailableTokens()) as $id => $token) {
$index = $id + 1;
'text_alignment' => 'C',
'token' => '{event.title}',
], $tokens[1]);
- $index =1;
+ $index = 1;
foreach ($this->getAvailableTokens() as $token => $expected) {
$this->assertEquals($expected, $tokens[$index]['value'], 'failure in token ' . $token);
$index++;
'{participant.fee_label}' => 'Fee Label',
'{participant.default_role_id}' => 'Default Role',
'{participant.template_title}' => 'Event Template Title',
- '{participant.currency}' => 'Currency',
- '{participant.participant_note}' => 'Participant Note',
'{participant.' . $this->getCustomFieldName('text') . '}' => 'Enter text here :: Group with field text',
];
}