Skip to content

Commit

Permalink
Add multiple attachment test
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed May 4, 2015
1 parent b3577cf commit c7e488d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/phpmailerTest.php
Expand Up @@ -966,6 +966,29 @@ public function testHTMLAttachment()
$this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
}

/**
* Simple HTML and multiple attachment test
*/
public function testHTMLMultiAttachment()
{
$this->Mail->Body = 'This is the <strong>HTML</strong> part of the email.';
$this->Mail->Subject .= ': HTML + multiple Attachment';
$this->Mail->isHTML(true);

if (!$this->Mail->addAttachment('../examples/images/phpmailer_mini.png', 'phpmailer_mini.png')) {
$this->assertTrue(false, $this->Mail->ErrorInfo);
return;
}

if (!$this->Mail->addAttachment('../examples/images/phpmailer.png', 'phpmailer.png')) {
$this->assertTrue(false, $this->Mail->ErrorInfo);
return;
}

$this->buildBody();
$this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
}

/**
* An embedded attachment test.
*/
Expand Down

0 comments on commit c7e488d

Please sign in to comment.