Remove rest of usage old model SubscriberIP

[MAILPOET-3032]
This commit is contained in:
Jan Lysý
2021-04-07 08:06:01 +02:00
committed by Veljko V
parent 5ce4eeed10
commit 31bff0efb4
6 changed files with 41 additions and 25 deletions

View File

@ -30,10 +30,11 @@ class SetupTest extends \MailPoetTest {
$settings = SettingsController::getInstance();
$referralDetector = new ReferralDetector($wpStub, $settings);
$subscriptionCaptcha = $this->diContainer->get(Captcha::class);
$populator = new Populator(
$settings,
$wpStub,
new Captcha(),
$subscriptionCaptcha,
$referralDetector,
$this->diContainer->get(FormsRepository::class),
$this->entityManager,
@ -48,7 +49,6 @@ class SetupTest extends \MailPoetTest {
expect($signupConfirmation)->true();
$captcha = $settings->fetch('captcha');
$subscriptionCaptcha = new Captcha;
$captchaType = $subscriptionCaptcha->isSupported() ? Captcha::TYPE_BUILTIN : Captcha::TYPE_DISABLED;
expect($captcha['type'])->equals($captchaType);
expect($captcha['recaptcha_site_token'])->equals('');

View File

@ -18,6 +18,7 @@ use MailPoet\Entities\SegmentEntity;
use MailPoet\Entities\SendingQueueEntity;
use MailPoet\Entities\SubscriberCustomFieldEntity;
use MailPoet\Entities\SubscriberEntity;
use MailPoet\Entities\SubscriberIPEntity;
use MailPoet\Entities\SubscriberSegmentEntity;
use MailPoet\Form\Util\FieldNameObfuscator;
use MailPoet\Listing\Handler;
@ -29,7 +30,6 @@ use MailPoet\Models\NewsletterOptionField;
use MailPoet\Models\Segment;
use MailPoet\Models\SendingQueue;
use MailPoet\Models\Subscriber;
use MailPoet\Models\SubscriberIP;
use MailPoet\Models\SubscriberSegment;
use MailPoet\Segments\SegmentsRepository;
use MailPoet\Settings\SettingsController;
@ -46,7 +46,6 @@ use MailPoet\Test\DataFactories\DynamicSegment;
use MailPoet\UnexpectedValueException;
use MailPoet\WP\Functions;
use MailPoetVendor\Carbon\Carbon;
use MailPoetVendor\Idiorm\ORM;
class SubscribersTest extends \MailPoetTest {
@ -938,6 +937,6 @@ class SubscribersTest extends \MailPoetTest {
$this->truncateEntity(CustomFieldEntity::class);
$this->truncateEntity(SubscriberCustomFieldEntity::class);
$this->diContainer->get(SettingsRepository::class)->truncate();
ORM::raw_execute('TRUNCATE ' . SubscriberIP::$_table);
$this->truncateEntity(SubscriberIPEntity::class);
}
}