/** * @param bool $ask * @param string|null $expected * @dataProvider getBillingAgreementCodeDataProvider */ public function testGetBillingAgreementCode($ask, $expected) { $this->currentCustomer->expects($this->once())->method('getCustomerId')->will($this->returnValue('customer id')); $this->_paypalData->expects($this->once())->method('shouldAskToCreateBillingAgreement')->with($this->identicalTo($this->_paypalConfig), 'customer id')->will($this->returnValue($ask)); $this->assertEquals($expected, $this->_model->getBillingAgreementCode()); }
public function testGetBillingAgreementCode() { $this->assertFalse($this->_model->getBillingAgreementCode()); }