public function MailchimpCampaignsTest::testSendTest in Mailchimp 8
Tests library functionality for sending a test campaign.
File
- lib/
mailchimp-api-php/ tests/ MailchimpCampaignsTest.php, line 150
Class
- MailchimpCampaignsTest
- Mailchimp Campaign test library.
Namespace
Mailchimp\TestsCode
public function testSendTest() {
$campaign_id = 'b03bfc273a';
$emails = [
'test@example.com',
];
$send_type = 'html';
$mc = new MailchimpCampaigns();
$mc
->sendTest($campaign_id, $emails, $send_type);
$this
->assertEquals('POST', $mc
->getClient()->method);
$this
->assertEquals($mc
->getEndpoint() . '/campaigns/' . $campaign_id . '/actions/test', $mc
->getClient()->uri);
}