Update dependencies in tests

[MAILPOET-4047]
This commit is contained in:
Jan Lysý
2022-02-24 20:02:18 +01:00
committed by Veljko V
parent 581d5d1f7f
commit eced7d27cd
2 changed files with 19 additions and 9 deletions

View File

@@ -3,9 +3,13 @@
namespace MailPoet\Test\Mailer\Methods\ErrorMappers;
use Codeception\Stub;
use MailPoet\Config\ServicesChecker;
use MailPoet\Mailer\MailerError;
use MailPoet\Mailer\Methods\ErrorMappers\MailPoetMapper;
use MailPoet\Services\Bridge;
use MailPoet\Services\Bridge\API;
use MailPoet\Settings\SettingsController;
use MailPoet\Util\License\Features\Subscribers;
use MailPoet\WP\Functions as WPFunctions;
class MailPoetMapperTest extends \MailPoetUnitTest {
@@ -17,16 +21,22 @@ class MailPoetMapperTest extends \MailPoetUnitTest {
public function _before() {
parent::_before();
$this->mapper = new MailPoetMapper();
$this->subscribers = ['a@example.com', 'c d <b@example.com>'];
WPFunctions::set(Stub::make(new WPFunctions, [
$wpFunctions = Stub::make(new WPFunctions, [
'_x' => function ($value) {
return $value;
},
'escAttr' => function ($value) {
return $value;
},
]));
]);
$this->mapper = new MailPoetMapper(
Stub::make(Bridge::class),
Stub::make(ServicesChecker::class),
Stub::make(SettingsController::class),
Stub::make(Subscribers::class),
$wpFunctions
);
$this->subscribers = ['a@example.com', 'c d <b@example.com>'];
}
public function testCreateBlacklistError() {