public function testGetEmailWhenBillingAddressNotExist() { $quoteMock = $this->getMock('Magento\\Quote\\Model\\Quote', [], [], '', false); $quoteMock->expects($this->once())->method('getBillingAddress')->willReturn(null); $this->model->setQuote($quoteMock); $this->assertEquals('', $this->model->getEmail()); }
public function testCanEditShippingMethod() { $this->model->setData('can_edit_shipping_method', true); static::assertTrue($this->model->canEditShippingMethod()); $this->model->setData('can_edit_shipping_method', false); static::assertTrue($this->model->canEditShippingMethod()); }
/** * Retrieve payment method and assign additional template values * * @return \Magento\Paypal\Block\Express\Review */ protected function _beforeToHtml() { return parent::_beforeToHtml(); }