示例#1
0
 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());
 }
示例#3
0
文件: Review.php 项目: aiesh/magento2
 /**
  * Retrieve payment method and assign additional template values
  *
  * @return \Magento\Paypal\Block\Express\Review
  */
 protected function _beforeToHtml()
 {
     return parent::_beforeToHtml();
 }