/**
  * @dataProvider getDataForTestSendMail
  *
  * @param null|string $type
  * @param null|string $to
  * @param array       $params
  * @param null|string $filename
  */
 public function testSendMail($type, $to, $params, $filename)
 {
     if (!$to && $type) {
         $this->provider->getTo($type)->shouldBeCalled();
     }
     if ($type) {
         $this->provider->getSubject($type, $params)->shouldBeCalled();
         $this->provider->getFrom($type)->shouldBeCalled();
         $this->provider->getBody($type, $params)->shouldBeCalled();
     }
     $this->provider->getCc($type)->shouldBeCalled();
     if (!$filename) {
         $this->provider->getAttachment($type)->shouldBeCalled();
     }
     $this->class->sendMail($type, $to, $params, $filename);
 }
 /**
  * @param MailEvent $event
  */
 public function sendMail(MailEvent $event)
 {
     $this->mailResolver->sendMail($event->getType(), $event->getTo(), $event->getParams());
 }