本文整理汇总了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]);
}