コード例 #1
0
ファイル: EmailTest.php プロジェクト: brash-creative/sendgrid
 public function testSetAttachmentCustomFilename()
 {
     $email = new Email();
     //Setting an attachment removes all other files
     $email->setAttachment("only_attachment.sad", "different");
     $attachments = $email->getAttachments();
     $this->assertEquals(1, count($attachments));
     $this->assertEquals($attachments[0]['custom_filename'], 'different');
     //Remove an attachment
     $email->removeAttachment("only_attachment.sad");
     $this->assertEquals(0, count($email->getAttachments()));
 }