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); }
/** * {@inheritdoc} */ public function addTransport(TransportInterface $transport) { $this->transports[$transport->getName()] = $transport; return $this; }