Example #1
0
 public function testAddCustomHeader()
 {
     $mail = new \r8\Mail($this->getTestTransport());
     $this->assertEquals(array(), $mail->getCustomHeaders());
     $this->assertSame($mail, $mail->addCustomHeader('X-Test', 'Example Header'));
     $this->assertEquals(array('X-Test' => 'Example Header'), $mail->getCustomHeaders());
     $this->assertSame($mail, $mail->addCustomHeader('X-Test', Null));
     $this->assertEquals(array('X-Test' => ''), $mail->getCustomHeaders());
     $this->assertSame($mail, $mail->addCustomHeader('In-Reply-To', 'abcxyz'));
     $this->assertEquals(array('X-Test' => '', 'In-Reply-To' => 'abcxyz'), $mail->getCustomHeaders());
 }