|
@@ 72-90 (lines=19) @@
|
| 69 |
|
]; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
public function testSendPlain() |
| 73 |
|
{ |
| 74 |
|
list($to, $from, $subject, $content, $plainContent, $attachments, $headers) = $this->getMockEmail(); |
| 75 |
|
|
| 76 |
|
$mailer = $this->getMock('Kinglozzer\SilverStripeMailgunner\Mailer', ['sendMessage']); |
| 77 |
|
$mailer->expects($this->once()) |
| 78 |
|
->method('sendMessage') |
| 79 |
|
->with( |
| 80 |
|
$this->equalTo($to), |
| 81 |
|
$this->equalTo($from), |
| 82 |
|
$this->equalTo($subject), |
| 83 |
|
$this->equalTo(''), |
| 84 |
|
$this->equalTo($plainContent), |
| 85 |
|
$this->equalTo($attachments), |
| 86 |
|
$this->equalTo($headers) |
| 87 |
|
); |
| 88 |
|
|
| 89 |
|
$mailer->sendPlain($to, $from, $subject, $plainContent, $attachments, $headers); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
public function testSendHTML() |
| 93 |
|
{ |
|
@@ 92-110 (lines=19) @@
|
| 89 |
|
$mailer->sendPlain($to, $from, $subject, $plainContent, $attachments, $headers); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
public function testSendHTML() |
| 93 |
|
{ |
| 94 |
|
list($to, $from, $subject, $content, $plainContent, $attachments, $headers) = $this->getMockEmail(); |
| 95 |
|
|
| 96 |
|
$mailer = $this->getMock('Kinglozzer\SilverStripeMailgunner\Mailer', ['sendMessage']); |
| 97 |
|
$mailer->expects($this->once()) |
| 98 |
|
->method('sendMessage') |
| 99 |
|
->with( |
| 100 |
|
$this->equalTo($to), |
| 101 |
|
$this->equalTo($from), |
| 102 |
|
$this->equalTo($subject), |
| 103 |
|
$this->equalTo($content), |
| 104 |
|
$this->equalTo($plainContent), |
| 105 |
|
$this->equalTo($attachments), |
| 106 |
|
$this->equalTo($headers) |
| 107 |
|
); |
| 108 |
|
|
| 109 |
|
$mailer->sendHTML($to, $from, $subject, $content, $attachments, $headers, $plainContent); |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
public function testSendMessage() |
| 113 |
|
{ |