Ejemplo n.º 1
0
 public function testTextAccessors()
 {
     $this->iniSet('sendmail_from', '');
     $mail = new \r8\Mail($this->getTestTransport());
     $this->assertFalse($mail->textExists());
     $this->assertNull($mail->getText());
     $this->assertSame($mail, $mail->setText("Hey there"));
     $this->assertTrue($mail->textExists());
     $this->assertSame("Hey there", $mail->getText());
     $this->assertSame($mail, $mail->clearText());
     $this->assertFalse($mail->textExists());
     $this->assertNull($mail->getText());
     $this->assertSame($mail, $mail->setText("Some kind of content"));
     $this->assertTrue($mail->textExists());
     $this->assertSame("Some kind of content", $mail->getText());
     $this->assertSame($mail, $mail->setText("  "));
     $this->assertFalse($mail->textExists());
     $this->assertNull($mail->getText());
 }