/**
  *
  */
 public function testNoTo()
 {
     $fromEmail = '*****@*****.**';
     $toEmails = null;
     $message = MailManager::getMailMessage($fromEmail, 'test Subject', 'testContent', $toEmails);
     $this->assertFalse($message);
 }
예제 #2
0
 /**
  *
  */
 public function testSendViaWrapped()
 {
     $transport = new \Swift_NullTransport();
     $mailer = new \Swift_Mailer($transport);
     $message = MailManager::getMailMessage('*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**');
     MailManager::sendVia($mailer, $message);
 }
 /**
  * @expectedException \BespokeSupport\MailWrapper\MailWrapperSetupException
  */
 public function testSendViaFail()
 {
     $message = MailManager::getMailMessage('*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**');
     MailManager::sendVia($message, null);
 }
예제 #4
0
 /**
  * @expectedException \BespokeSupport\MailWrapper\MailWrapperSetupException
  */
 public function testExceedEmails()
 {
     $apiKey = 'key';
     $domain = 'example.com';
     $manager = new MailgunManager($apiKey, $domain);
     $toMails = [];
     for ($i = 0; $i <= 1001; $i++) {
         $toMails[] = $i . '*****@*****.**';
     }
     $message = MailManager::getMailMessage('*****@*****.**', '*****@*****.**', '*****@*****.**', $toMails);
     MailManagerSendMailgun::send($manager, $message);
 }