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);
 }
 /**
  * @param bool $clone
  *
  * @return array
  */
 public function getConfig($clone = false)
 {
     $template = 'test';
     $variables = array('foo' => 'bar');
     $mail = $this->getMockBuilder(MailRenderedInterface::class)->getMock();
     $this->templater->expects($this->at(0))->method('render')->with($template, $variables, MailTypes::TYPE_ALL)->will($this->returnValue($mail));
     if ($clone) {
         $this->templater->expects($this->at(1))->method('render')->with($template, $variables, MailTypes::TYPE_ALL)->will($this->returnValue(clone $mail));
     }
     return array($template, $variables, $mail);
 }