From edb5a04ae2be08979e4ff1e3e7fceb0b34114282 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 18 Feb 2019 13:26:53 +1300 Subject: [PATCH] Change the call used to generate recipients in unit tests Passes in scheduled_date (as the 'real' api call would) Part of this attempted deprecation #13627 --- tests/phpunit/api/v3/MailingTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/api/v3/MailingTest.php b/tests/phpunit/api/v3/MailingTest.php index 18032ef7fe..5c7a16f941 100644 --- a/tests/phpunit/api/v3/MailingTest.php +++ b/tests/phpunit/api/v3/MailingTest.php @@ -195,11 +195,11 @@ class api_v3_MailingTest extends CiviUnitTestCase { // ** Pass 1: Create $createParams = $this->_params; - $createParams['groups']['include'] = array($groupIDs['a']); - $createParams['groups']['exclude'] = array(); - $createParams['mailings']['include'] = array(); - $createParams['mailings']['exclude'] = array(); - $createParams['api.mailing_job.create'] = 1; + $createParams['groups']['include'] = [$groupIDs['a']]; + $createParams['groups']['exclude'] = []; + $createParams['mailings']['include'] = []; + $createParams['mailings']['exclude'] = []; + $createParams['scheduled_date'] = 'now'; $createResult = $this->callAPISuccess('Mailing', 'create', $createParams); $getGroup1 = $this->callAPISuccess('MailingGroup', 'get', array('mailing_id' => $createResult['id'])); $getGroup1_ids = array_values(CRM_Utils_Array::collect('entity_id', $getGroup1['values'])); @@ -225,7 +225,7 @@ class api_v3_MailingTest extends CiviUnitTestCase { $updateParams = $createParams; $updateParams['id'] = $createResult['id']; $updateParams['groups']['include'] = array($groupIDs['b']); - $updateParams['api.mailing_job.create'] = 1; + $updateParams['scheduled_date'] = 'now'; $this->callAPISuccess('Mailing', 'create', $updateParams); $getGroup3 = $this->callAPISuccess('MailingGroup', 'get', array('mailing_id' => $createResult['id'])); $getGroup3_ids = array_values(CRM_Utils_Array::collect('entity_id', $getGroup3['values'])); -- 2.25.1