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); }
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'); }