Esempio n. 1
0
 public function testSendWithoutTemplate()
 {
     $message = $this->getMockBuilder(\Swift_Message::class)->disableOriginalConstructor()->getMock();
     $this->templater->expects($this->never())->method('render');
     $this->transport->expects($this->once())->method('send')->with($message, null)->will($this->returnValue(true));
     $res = $this->mailer->send('test', $message);
     $this->assertTrue($res);
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function addTransport(TransportInterface $transport)
 {
     $this->transports[$transport->getName()] = $transport;
     return $this;
 }