data = []; $this->wp = WPFunctions::get(); $this->captcha = $this->diContainer->get(Captcha::class); } public function testItDisplaysConfirmPage() { $pages = Stub::make(Pages::class, [ 'wp' => $this->wp, 'confirm' => Expected::exactly(1), ], $this); $subscription = new Subscription($pages, $this->wp, $this->captcha); $subscription->confirm($this->data); } public function testItDisplaysManagePage() { $pages = Stub::make(Pages::class, [ 'wp' => new WPFunctions, 'getManageLink' => Expected::exactly(1), 'getManageContent' => Expected::exactly(1), ], $this); $subscription = new Subscription($pages, $this->wp, $this->captcha); $subscription->manage($this->data); do_shortcode('[mailpoet_manage]'); do_shortcode('[mailpoet_manage_subscription]'); } public function testItDisplaysUnsubscribePage() { $pages = Stub::make(Pages::class, [ 'wp' => new WPFunctions, 'unsubscribe' => Expected::exactly(1), ], $this); $subscription = new Subscription($pages, $this->wp, $this->captcha); $subscription->unsubscribe($this->data); } }