本文整理汇总了PHP中EbayEnterprise_MageLog_Helper_Context::method方法的典型用法代码示例。如果您正苦于以下问题:PHP EbayEnterprise_MageLog_Helper_Context::method方法的具体用法?PHP EbayEnterprise_MageLog_Helper_Context::method怎么用?PHP EbayEnterprise_MageLog_Helper_Context::method使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EbayEnterprise_MageLog_Helper_Context
的用法示例。
在下文中一共展示了EbayEnterprise_MageLog_Helper_Context::method方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
// Prevent log context from needing session while gather context data for logging.
$this->logContext = $this->getHelperMock('ebayenterprise_magelog/context', ['getMetaData']);
$this->logContext->method('getMetaData')->will($this->returnValue([]));
$this->api = $this->getMock('\\eBayEnterprise\\RetailOrderManagement\\Api\\IBidirectionalApi');
$this->configModel = $this->buildCoreConfigRegistry(['apiService' => 'inventory', 'apiOperation' => 'allocate']);
$this->helper = $this->getHelperMock('ebayenterprise_inventory');
$this->helper->method('getConfigModel')->will($this->returnValue($this->configModel));
$this->coreHelper = $this->getHelperMock('eb2ccore', ['getSdkApi']);
$this->coreHelper->method('getSdkApi')->will($this->returnValue($this->api));
}
示例2: setUp
/**
* prepare stubs
*/
public function setUp()
{
parent::setUp();
$this->_httpApi = $this->getMockBuilder('\\eBayEnterprise\\RetailOrderManagement\\Api\\HttpApi')->disableOriginalConstructor()->getMock();
$this->_observerStub = $this->getModelMock('ebayenterprise_order/observer');
$this->_itemSelection = $this->getHelperMock('ebayenterprise_order/item_selection', ['selectFrom']);
$this->_payloadFactory = new PayloadFactory();
$this->_request = $this->_payloadFactory->buildPayload('\\eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\OrderCreateRequest');
$this->_requestStub = $this->getMock('\\eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\IOrderCreateRequest');
$this->_replyStub = $this->getMock('\\eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\IOrderCreateReply');
$this->_coreHelperStub = $this->getHelperMock('eb2ccore/data', ['generateRequestId', 'getConfigModel']);
$coreConfig = $this->buildCoreConfigRegistry(['clientCustomerIdPrefix' => $this->_clientCustomerIdPrefix, 'language_code' => 'en-us', 'clientCustomerIdLength' => 0]);
$this->_coreHelperStub->expects($this->any())->method('getConfigModel')->will($this->returnValue($coreConfig));
$this->_config = $this->buildCoreConfigRegistry(['levelOfService' => $this->_expectedLevelOfService, 'orderType' => $this->_expectedOrderType, 'requestIdPrefix' => $this->_expectedRequestIdPrefix, 'apiCreateOperation' => 'create', 'apiService' => 'orders', 'genderMap' => ['Female' => 'F', 'Male' => 'M', 'SomeOtherGender' => 'Invalid']]);
$this->_orderHelperStub = $this->getHelperMock('ebayenterprise_order', ['prefixCustomerId']);
// Mock the customer id prefixing method to return the customer id
// prefixed with the constant client customer id prefix.
$clientCustomerIdPrefix = $this->_clientCustomerIdPrefix;
$this->_orderHelperStub->method('prefixCustomerId')->will($this->returnCallback(function ($id) use($clientCustomerIdPrefix) {
return $clientCustomerIdPrefix . $id;
}));
$this->_customer = Mage::getModel('customer/customer', ['increment_id' => '12345123456789']);
$this->_order = Mage::getModel('sales/order', ['created_at' => '2014-07-28 16:22:46', 'customer' => $this->_customer, 'customer_dob' => '2014-07-28 16:22:46', 'customer_email' => 'test@example.com', 'customer_firstname' => 'fname', 'customer_lastname' => 'lname', 'customer_middlename' => 'mname', 'customer_prefix' => 'mr', 'customer_id' => '123456789', 'customer_taxvat' => 'taxid', 'increment_id' => '12345123456789']);
$this->_item1 = $this->getModelMock('sales/order_item', []);
$this->_item2 = $this->getModelMock('sales/order_item', []);
$this->_billAddress = Mage::getModel('sales/order_address', ['address_type' => Mage_Customer_Model_Address_Abstract::TYPE_BILLING, 'entity_id' => $this->_billAddressId]);
$this->_shipAddress = Mage::getModel('sales/order_address', ['address_type' => Mage_Customer_Model_Address_Abstract::TYPE_SHIPPING, 'entity_id' => $this->_shipAddressId]);
// Mock log context to prevent session interactions while building out log data.
$this->_logContext = $this->getHelperMock('ebayenterprise_magelog/context', ['getMetaData']);
$this->_logContext->method('getMetaData')->will($this->returnValue([]));
// prevent magento events from actually triggering
Mage::app()->disableEvents();
}