Refactor creating of default form to use templates

[MAILPOET-2985]
This commit is contained in:
Rostislav Wolny
2020-07-01 10:47:23 +02:00
committed by Veljko V
parent 4fc3d7b686
commit 14aa0b1393
11 changed files with 115 additions and 92 deletions

View File

@ -15,6 +15,7 @@ use MailPoet\Cron\Workers\StatsNotifications\Scheduler as StatsNotificationsSche
use MailPoet\DI\ContainerWrapper;
use MailPoet\Entities\NewsletterEntity;
use MailPoet\Features\FeaturesController;
use MailPoet\Form\FormFactory;
use MailPoet\Logging\LoggerFactory;
use MailPoet\Mailer\MailerLog;
use MailPoet\Models\Newsletter;
@ -72,7 +73,14 @@ class SendingQueueTest extends \MailPoetTest {
$this->settings = SettingsController::getInstance();
$referralDetector = new ReferralDetector(WPFunctions::get(), $this->settings);
$featuresController = Stub::makeEmpty(FeaturesController::class);
$populator = new Populator($this->settings, WPFunctions::get(), new Captcha, $referralDetector, $featuresController);
$populator = new Populator(
$this->settings,
WPFunctions::get(),
new Captcha,
$referralDetector,
$featuresController,
$this->diContainer->get(FormFactory::class)
);
$populator->up();
$this->subscriber = Subscriber::create();
$this->subscriber->email = 'john@doe.com';