当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Sales_Model_Order_Address::expects方法代码示例

本文整理汇总了PHP中Mage_Sales_Model_Order_Address::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Order_Address::expects方法的具体用法?PHP Mage_Sales_Model_Order_Address::expects怎么用?PHP Mage_Sales_Model_Order_Address::expects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Sales_Model_Order_Address的用法示例。


在下文中一共展示了Mage_Sales_Model_Order_Address::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     $this->_taxCollector = $this->getModelMock('ebayenterprise_tax/collector', ['getTaxRecords']);
     $this->_payloadHelper = $this->getHelperMock('ebayenterprise_tax/payload', ['taxRecordToTaxPayload']);
     $this->_address = $this->getModelMock('sales/order_address', ['getQuoteAddressId']);
     $this->_address->expects($this->any())->method('getQuoteAddressId')->will($this->returnValue($this->_quoteAddressId));
     // SDK Payloads that are expected to be filled out.
     $this->_shipGroup = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\IGifting', ['getGiftPricing', 'getEmptyGiftingPriceGroup', 'setGiftPricing']);
     $this->_taxContainer = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\IPriceGroup', ['getTaxes', 'setTaxes']);
     $this->_taxIterable = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\ITaxIterable', ['offsetSet', 'getEmptyTax']);
     $this->_taxPayload = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\ITax');
     // Create this as the expected tax payload to be added to the
     // tax iterable - assume this to be a tax payload with all data
     // from a tax record set to it.
     $this->_completeTaxPayload = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\ITax');
     // The tax container will always return a tax iterable.
     $this->_taxContainer->expects($this->any())->method('getTaxes')->will($this->returnValue($this->_taxIterable));
     $this->_addressGiftTax = $this->_mockTaxRecord(EbayEnterprise_Tax_Model_Record::SOURCE_ADDRESS_GIFTING, $this->_quoteAddressId);
     $this->_itemGiftTax = $this->_mockTaxRecord(EbayEnterprise_Tax_Model_Record::SOURCE_ITEM_GIFTING, $this->_quoteAddressId);
     $this->_merchGiftTax = $this->_mockTaxRecord(EbayEnterprise_Tax_Model_Record::SOURCE_MERCHANDISE, $this->_quoteAddressId);
     $this->_shipGroupHandler = Mage::getModel('ebayenterprise_tax/order_create_shipgroup', ['address' => $this->_address, 'ship_group' => $this->_shipGroup, 'tax_collector' => $this->_taxCollector, 'payload_helper' => $this->_payloadHelper]);
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:22,代码来源:ShipgroupTest.php


注:本文中的Mage_Sales_Model_Order_Address::expects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。