Remove rest of usage old model SubscriberIP
[MAILPOET-3032]
This commit is contained in:
@@ -5,6 +5,7 @@ namespace MailPoet\Test\Router\Endpoints;
|
||||
use Codeception\Stub;
|
||||
use Codeception\Stub\Expected;
|
||||
use MailPoet\Router\Endpoints\Subscription;
|
||||
use MailPoet\Subscription\Captcha;
|
||||
use MailPoet\Subscription\Pages;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
@@ -14,9 +15,13 @@ class SubscriptionTest extends \MailPoetTest {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
/** @var Captcha */
|
||||
private $captcha;
|
||||
|
||||
public function _before() {
|
||||
$this->data = [];
|
||||
$this->wp = WPFunctions::get();
|
||||
$this->captcha = $this->diContainer->get(Captcha::class);
|
||||
}
|
||||
|
||||
public function testItDisplaysConfirmPage() {
|
||||
@@ -24,7 +29,7 @@ class SubscriptionTest extends \MailPoetTest {
|
||||
'wp' => $this->wp,
|
||||
'confirm' => Expected::exactly(1),
|
||||
], $this);
|
||||
$subscription = new Subscription($pages, $this->wp);
|
||||
$subscription = new Subscription($pages, $this->wp, $this->captcha);
|
||||
$subscription->confirm($this->data);
|
||||
}
|
||||
|
||||
@@ -34,7 +39,7 @@ class SubscriptionTest extends \MailPoetTest {
|
||||
'getManageLink' => Expected::exactly(1),
|
||||
'getManageContent' => Expected::exactly(1),
|
||||
], $this);
|
||||
$subscription = new Subscription($pages, $this->wp);
|
||||
$subscription = new Subscription($pages, $this->wp, $this->captcha);
|
||||
$subscription->manage($this->data);
|
||||
do_shortcode('[mailpoet_manage]');
|
||||
do_shortcode('[mailpoet_manage_subscription]');
|
||||
@@ -45,7 +50,7 @@ class SubscriptionTest extends \MailPoetTest {
|
||||
'wp' => new WPFunctions,
|
||||
'unsubscribe' => Expected::exactly(1),
|
||||
], $this);
|
||||
$subscription = new Subscription($pages, $this->wp);
|
||||
$subscription = new Subscription($pages, $this->wp, $this->captcha);
|
||||
$subscription->unsubscribe($this->data);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user