Beispiel #1
0
 public function testFileAttaches()
 {
     $email = new SimpleEmail();
     $email->AddAttachment("/path/to/file");
     $this->assertEquals("/path/to/file", $email->GetAttachments()[0]->path);
     $this->assertEquals("file", $email->GetAttachments()[0]->name);
     $email->AddAttachment("/path/to/another-file", "different-name");
     $this->assertEquals("/path/to/another-file", $email->GetAttachments()[1]->path);
     $this->assertEquals("different-name", $email->GetAttachments()[1]->name);
 }