createCampaign() публичный Метод

public createCampaign ( string $fromName, string $replyTo, string $subject, string $html = '', string $listName = '', array $options = [], array $contentOptions = [] ) : array | boolean
$fromName string
$replyTo string
$subject string
$html string
$listName string
$options array
$contentOptions array
Результат array | boolean
 /** @test */
 public function is_can_create_a_campaign()
 {
     $fromName = 'Spatie';
     $replyTo = '*****@*****.**';
     $subject = 'This is a subject';
     $html = '<b>This is the content</b>';
     $listName = 'list1';
     $options = ['extraOption' => 'extraValue'];
     $contentOptions = ['plain text' => 'this is the plain text content'];
     $campaignId = 'newCampaignId';
     $this->mailChimpApi->shouldReceive('post')->once()->withArgs(['campaigns', ['type' => 'regular', 'recipients' => ['list_id' => 123], 'settings' => ['subject_line' => $subject, 'from_name' => $fromName, 'reply_to' => $replyTo], 'extraOption' => 'extraValue']])->andReturn(['id' => $campaignId]);
     $this->mailChimpApi->shouldReceive('put')->once()->withArgs(["campaigns/{$campaignId}/content", ['html' => $html, 'plain text' => 'this is the plain text content']]);
     $this->newsletter->createCampaign($fromName, $replyTo, $subject, $html, $listName, $options, $contentOptions);
 }