fixed all tests

This commit is contained in:
Antonio Ramirez
2016-12-11 21:34:22 +01:00
parent 4588d77129
commit 4c9b9671b5
37 changed files with 214 additions and 135 deletions

View File

@ -2,8 +2,8 @@
namespace Da\User\Service;
use Da\User\Contracts\ServiceInterface;
use yii\swiftmailer\Mailer;
use Yii;
use yii\mail\BaseMailer;
class MailService implements ServiceInterface
{
@ -24,9 +24,9 @@ class MailService implements ServiceInterface
* @param string $subject
* @param string $view
* @param array $params
* @param Mailer $mailer
* @param MailerInterface $mailer
*/
public function __construct($from, $to, $subject, $view, array $params, Mailer $mailer)
public function __construct($from, $to, $subject, $view, array $params, BaseMailer $mailer)
{
$this->from = $from;
$this->to = $to;
@ -56,7 +56,8 @@ class MailService implements ServiceInterface
*/
public function run()
{
return $this->mailer->compose(['html' => $this->view, 'text' => "text/{$this->view}"], $this->params)
return $this->mailer
->compose(['html' => $this->view, 'text' => "text/{$this->view}"], $this->params)
->setFrom($this->from)
->setTo($this->to)
->setSubject($this->subject)