示例#1
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage Sender email and name is empty
  */
 public function testFromEmpty()
 {
     $entity = new \stdClass();
     $this->helper->expects($this->once())->method('getSingleEntityIdentifier')->will($this->returnValue(1));
     $marketingList = new MarketingList();
     $marketingList->setEntity($entity);
     $template = new EmailTemplate();
     $template->setType('html');
     $settings = new InternalTransportSettings();
     $settings->setTemplate($template);
     $campaign = new EmailCampaign();
     $campaign->setMarketingList($marketingList)->setTransportSettings($settings);
     $this->transport->send($campaign, $entity, [], []);
 }