/** * @covers Ebizmarts\MageMonkey\Model\Plugin\Subscriber::beforeSubscribeCustomerById */ public function testBeforeSubscribeCustomerById() { $this->plugin->beforeSubscribeCustomerById($this->subscriberMock, 1); $this->helperMock->expects($this->exactly(2))->method('isDoubleOptInEnabled')->willReturn(true); $this->plugin->beforeSubscribeCustomerById($this->subscriberMock, 1); $this->helperMock->expects($this->once())->method('getMergeVars')->willReturn(['FNAME' => 'fname']); $this->plugin->beforeSubscribeCustomerById($this->subscriberMock, 1); }