Replace "new SettingsController()" with fetch from DI container

[MAILPOET-2436]
This commit is contained in:
Jan Jakeš
2019-10-24 10:48:58 +02:00
committed by Jack Kitterhing
parent c91cd1255a
commit d970dda637
79 changed files with 132 additions and 125 deletions

View File

@@ -511,7 +511,7 @@ class APITest extends \MailPoetTest {
}
function testItSchedulesWelcomeNotificationByDefaultAfterAddingSubscriber() {
$settings = new SettingsController();
$settings = SettingsController::getInstance();
$settings->set('signup_confirmation.enabled', false);
$API = Stub::makeEmptyExcept(
\MailPoet\API\MP\v1\API::class,
@@ -529,7 +529,7 @@ class APITest extends \MailPoetTest {
}
function testItThrowsIfWelcomeEmailFails() {
$settings = new SettingsController();
$settings = SettingsController::getInstance();
$settings->set('signup_confirmation.enabled', false);
$task = ScheduledTask::create();
$task->type = 'sending';
@@ -861,7 +861,7 @@ class APITest extends \MailPoetTest {
}
function _before() {
$settings = new SettingsController();
$settings = SettingsController::getInstance();
$settings->set('signup_confirmation.enabled', true);
}