Example #1
0
 public function testSetsXMailerHeader()
 {
     $mail = new Message();
     $this->expectedMail = $mail;
     $mailer = 'test/mailer';
     $this->target->setMailer($mailer);
     $this->target->send($mail);
     $headers = $mail->getHeaders();
     $this->assertTrue($headers->has('X-Mailer'));
     $this->assertEquals("X-Mailer: {$mailer}", $headers->get('X-Mailer')->toString());
 }
Example #2
0
 /**
  * @testdox Allows setting and getting X-Mailer header string
  */
 public function testSetAndGetMailer()
 {
     $target = new MailService();
     $expected = 'test/mailer';
     $target->setMailer($expected);
     $this->assertEquals($expected, $target->getMailer());
 }