Example #1
0
 public function testCreateEmail()
 {
     $expectedResponse = $this->createExpectedResponse('createContact');
     $this->httpClient->expects($this->any())->method('send')->willReturn($expectedResponse);
     $data = array('language' => 'en', 'name' => 'test api 010', 'fromemail' => '*****@*****.**', 'fromname' => 'sender email', 'subject' => 'subject here', 'email_category' => '17', 'html_source' => '<html>Hello $First Name$,... </html>', 'text_source' => 'email text', 'segment' => 1121, 'contactlist' => 0, 'unsubscribe' => 1, 'browse' => 0);
     $response = $this->client->createEmail($data);
     $this->assertEquals(Response::REPLY_CODE_OK, $response->getReplyCode());
     $this->assertArrayHasKey('id', $response->getData());
 }