public function testSucceedWithOptionsArrayContentID()
 {
     $options = $this->makeAttachmentTestOptions();
     $options['attachments'] = array(['name' => 'test.gif', 'data' => 'data'], ['name' => 't.jpg', 'data' => 'data2'], ['name' => 'z.png', 'data' => 'data3'], ['name' => 'c.jpg', 'data' => 'data4', 'content_id' => '<cid>']);
     $message = new AdminMessage($options);
     $message_proto = $this->setUpAttachmentMessageProto();
     $attach = $message_proto->addAttachment();
     $attach->setFilename('c.jpg');
     $attach->setData('data4');
     $attach->setContentId('<cid>');
     $response = new VoidProto();
     $this->apiProxyMock->expectCall('mail', 'SendToAdmins', $message_proto, $response);
     $message->send();
     $this->apiProxyMock->verify();
 }
 public function testSucceedWithOptionsArray()
 {
     $headers = array('in-reply-to' => 'data', 'list-id' => 'data2', 'references' => 'data3');
     $attachments = array('test.gif' => 'data', 't.jpg' => 'data2', 'z.png' => 'data3');
     $options = array('sender' => '*****@*****.**', 'replyto' => '*****@*****.**', 'subject' => 'test', 'textBody' => 'text body', 'htmlBody' => 'html body', 'header' => $headers, 'attachment' => $attachments);
     $message = new AdminMessage($options);
     $message_proto = new MailMessage();
     $message_proto->setSender("*****@*****.**");
     $message_proto->setReplyto("*****@*****.**");
     $message_proto->setSubject("test");
     $message_proto->setTextbody("text body");
     $message_proto->setHtmlbody("html body");
     $header = $message_proto->addHeader();
     $header->setName("in-reply-to");
     $header->setValue("data");
     $header = $message_proto->addHeader();
     $header->setName("list-id");
     $header->setValue("data2");
     $header = $message_proto->addHeader();
     $header->setName("references");
     $header->setValue("data3");
     $attach = $message_proto->addAttachment();
     $attach->setFilename("test.gif");
     $attach->setData("data");
     $attach = $message_proto->addAttachment();
     $attach->setFilename("t.jpg");
     $attach->setData("data2");
     $attach = $message_proto->addAttachment();
     $attach->setFilename("z.png");
     $attach->setData("data3");
     $response = new VoidProto();
     $this->apiProxyMock->expectCall('mail', 'SendToAdmins', $message_proto, $response);
     $message->send();
     $this->apiProxyMock->verify();
 }