Fix PR remarks [MAILPOET-2176]

This commit is contained in:
wxa
2019-07-10 18:51:30 +03:00
committed by Jan Jakeš
parent 0b6490e817
commit 595145e50f
9 changed files with 75 additions and 45 deletions

View File

@@ -1,6 +1,7 @@
<?php
namespace MailPoet\Test\Mailer\Methods;
use Codeception\Stub;
use MailPoet\Mailer\MailerError;
use MailPoet\Mailer\Methods\ErrorMappers\SendGridMapper;
use MailPoet\Mailer\Methods\SendGrid;
@@ -86,10 +87,13 @@ class SendGridTest extends \MailPoetTest {
function testItChecksBlacklistBeforeSending() {
$blacklisted_subscriber = 'blacklist_test@example.com';
$blacklist = new Blacklist();
$blacklist->addEmail($blacklisted_subscriber);
$this->mailer->setBlacklist($blacklist);
$result = $this->mailer->send(
$blacklist = Stub::make(new Blacklist(), ['isBlacklisted' => true], $this);
$mailer = Stub::make(
$this->mailer,
['blacklist' => $blacklist, 'error_mapper' => new SendGridMapper()],
$this
);
$result = $mailer->send(
$this->newsletter,
$blacklisted_subscriber
);