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

@@ -5,6 +5,7 @@ namespace MailPoet\Test\Newsletter;
use Codeception\Util\Stub;
use MailPoet\Config\Populator;
use MailPoet\Features\FeaturesController;
use MailPoet\Form\FormFactory;
use MailPoet\Models\CustomField;
use MailPoet\Models\Newsletter;
use MailPoet\Models\SendingQueue;
@@ -42,7 +43,14 @@ class ShortcodesTest 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->wPUser = $this->_createWPUser();
$this->wPPost = $this->_createWPPost();