Add Populator to DI

This commit is contained in:
Amine Ben hammou
2019-06-25 12:04:14 +01:00
committed by M. Shull
parent fecfe32457
commit 5ae402bcab
8 changed files with 24 additions and 14 deletions

View File

@ -46,7 +46,8 @@ class SendingQueueTest extends \MailPoetTest {
parent::_before();
$wp_users = get_users();
wp_set_current_user($wp_users[0]->ID);
$populator = new Populator();
$this->settings = new SettingsController();
$populator = new Populator($this->settings, WPFunctions::get());
$populator->up();
$this->subscriber = Subscriber::create();
$this->subscriber->email = 'john@doe.com';
@ -83,7 +84,6 @@ class SendingQueueTest extends \MailPoetTest {
$this->newsletter_link->hash = 'abcde';
$this->newsletter_link->save();
$this->sending_error_handler = new SendingErrorHandler();
$this->settings = new SettingsController();
$this->stats_notifications_worker = new StatsNotificationsScheduler($this->settings);
$this->sending_queue_worker = new SendingQueueWorker($this->sending_error_handler, $this->stats_notifications_worker);
}