Exemplo n.º 1
0
 public function testMailerIsCalledWithMessage()
 {
     $messageData = ['to' => '', 'from' => '', 'subject' => '', 'body' => '', 'alt' => null];
     $message = $this->getMock('Swift_Mime_Message');
     $this->messageFactory->method('create')->willReturn($message);
     $this->mailer->expects($this->once())->method('send')->with($message);
     $this->fixture->process($messageData);
 }
Exemplo n.º 2
0
 public function testMessageBodyHasMultipartContentIfAltTrue()
 {
     $body = uniqid();
     $actual = $this->fixture->create(null, null, null, $body, true);
     $this->assertContains('Content-Type: multipart/alternative', $actual->getHeaders()->toString(), 'Message does not include an alternative format for body');
 }