Esempio n. 1
0
 public function testSend()
 {
     $message = new Message();
     $message->setText('Example text')->setTo('*****@*****.**')->setFrom('*****@*****.**')->setSubject('Example subject');
     // override mail()
     $mock = $this->getRunkitMock(array('mail'));
     $mock->expects($this->once())->method('mail')->with('', '', $message->getText(), $message->getHeaders())->willReturn(true);
     // test
     $mail = new Mail();
     $mail->send($message);
 }
Esempio n. 2
0
 public function testText()
 {
     $text = 'Example message';
     $this->assertEquals($this->message, $this->message->setText($text));
     $this->assertEquals($text, $this->message->getText());
 }