6 * Class MailingTestTrait
9 * This trait defines a number of helper functions for managing
12 trait MailingTestTrait
{
15 * Helper function to create new mailing.
17 * @param array $params
21 public function createMailing($params = []) {
22 $params = array_merge(array(
23 'subject' => 'maild' . rand(),
24 'body_text' => 'bdkfhdskfhduew{domain.address}{action.optOutUrl}',
25 'name' => 'mailing name' . rand(),
29 $result = $this->callAPISuccess('Mailing', 'create', $params);
34 * Helper function to delete mailing.
37 public function deleteMailing($id) {
42 $this->callAPISuccess('Mailing', 'delete', $params);