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


PHP Xcom_TestCase类代码示例

本文整理汇总了PHP中Xcom_TestCase的典型用法代码示例。如果您正苦于以下问题:PHP Xcom_TestCase类的具体用法?PHP Xcom_TestCase怎么用?PHP Xcom_TestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setup

 public function setup()
 {
     parent::setUp();
     //$channelOrdersMock = $this->mockResource('xcom_order/order');
     //$channelOrderMock = $this->mockModel('xcom_order/order');
     //Mock need to be created per-test as far as some mocked methods may not be needed
     /*$this->_shipmentMock = $this->mockModel('Mage_Sales_Model_Order_Shipment',
                 array('getIncrementId', 'getAllTracks', 'getOrder'));
             $orderMock =   $this->mockModel('Mage_Sales_Model_Order', array(
                 'getRealOrderId',
                 'getShippingAddress',
                 'getPayment'));
     
             $paymentMock = $this->mockModel('Mage_Sales_Model_Order_Payment');
     
             $shippingAddressMock = $this->mockModel('Mage_Sales_Model_Order_Address', array('getCountryId'));
             $shippingAddressMock->expects($this->once())
                 ->method('getCountryId')
                 ->will($this->returnValue('US'));
     
             $orderMock->expects($this->once())
                 ->method('getShippingAddress')
                 ->will($this->returnValue($shippingAddressMock));
             $orderMock->expects($this->once())
                 ->method('getPayment')
                 ->will($this->returnValue($paymentMock));
             $this->_orderMock = $orderMock;*/
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:28,代码来源:OrderTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_object = new Xcom_Listing_Model_Listing();
     $this->_productOne = new Varien_Object(array('id' => 1, 'sku' => 'Product1', 'status' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED, 'price' => 100, 'is_in_stock' => 1, 'stock_item' => new Varien_Object(array('qty' => 10))));
     $this->_productTwo = new Varien_Object(array('id' => 2, 'sku' => 'Product2', 'status' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED, 'price' => 200, 'is_in_stock' => 1, 'stock_item' => new Varien_Object(array('qty' => 20))));
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:7,代码来源:ListingTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $request = new Varien_Object();
     $response = new Varien_Object();
     $this->_object = new Xcom_Log_Adminhtml_LogController($request, $response);
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:7,代码来源:LogControllerTest.php

示例4: setUp

 public function setUp()
 {
     $this->_checkConnection = true;
     parent::setUp();
     $request = new Varien_Object();
     $response = new Varien_Object();
     $this->_object = new Xcom_Ebay_Adminhtml_Ebay_ProductController($request, $response);
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:8,代码来源:ProductControllerTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_object = new Public_Xcom_Mapping_Model_Resource_Product_Type();
     $this->_resource = new Mage_Core_Model_Resource();
     $this->_productType = new Xcom_Mapping_Model_Product_Type();
     $this->_productType->setId(101)->setProductTypeId(1)->setIsMultiselect(1)->setLocaleCode('en_US')->setName('Product Type');
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:8,代码来源:TypeTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_resource = new Mage_Core_Model_Resource();
     $this->_object = new Public_Xcom_Mapping_Model_Resource_Attribute();
     $this->_attribute = new Xcom_Mapping_Model_Attribute();
     $this->_attribute->setId(101)->setProductTypeId(1)->setIsMultiselect(1)->setLocaleCode('en_US')->setName('Attribute Name')->setChannelDecoration(array(array('channel_code' => 'channel_code_1', 'is_required' => 1, 'is_variation' => 0), array('channel_code' => 'channel_code_2', 'is_required' => 0, 'is_variation' => 1), array('channel_code' => 'channel_code_3', 'is_required' => 1, 'is_variation' => 1)));
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:8,代码来源:AttributeTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_object = Mage::getModel('xcom_channelgroup/config_channeltype');
     $configGroup = array('group1' => array('title' => 'group1Title', 'sort_order' => 10));
     $this->mockStoreConfig(Xcom_ChannelGroup_Model_Config_Channeltype::XML_PATH_XCOM_CHANNEL_GROUP, $configGroup);
     $configType = array('type1' => array('group' => 'group1', 'title' => 'type1Title', 'module' => '', 'sort_order' => 10));
     $this->mockStoreConfig(Xcom_ChannelGroup_Model_Config_Channeltype::XML_PATH_XCOM_CHANNEL_TYPE, $configType);
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:9,代码来源:ChanneltypeTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_object = new Xcom_Xfabric_Model_Transport_Xfabric(array('url' => 'http://x.com/'));
     //        $this->_object = $this->mockModel('xcom_xfabric/transport_xfabric', array('_getResponseMessage'));
     //        $this->_object->expects($this->any())
     //          ->method('_getResponseMessage')
     //          ->will($this->returnValue(true));
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:9,代码来源:XfabricTest.php

示例9: setUp

 public function setUp()
 {
     $this->_checkConnection = true;
     parent::setUp();
     /** @var $object Xcom_Ebay_Block_Adminhtml_Channel_Edit */
     $channel = Mage::getModel('xcom_ebay/channel');
     $channel->setId(1);
     $channel->setName('Ebay US');
     $channel->setChanneltypeCode('ebay');
     Mage::register('current_channel', $channel);
     $this->object = new Xcom_Ebay_Block_Adminhtml_Channel_Edit();
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:12,代码来源:EditTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $channel = Mage::getModel('xcom_ebay/channel');
     $channel->setId(1);
     $channel->setChanneltypeCode('ebay');
     $channel->setSiteCode('US');
     Mage::register('current_channel', $channel);
     $policy = Mage::getModel('xcom_ebay/policy');
     Mage::register('current_policy', $policy);
     /** @var $object Xcom_Ebay_Block_Adminhtml_Channel_Edit */
     $this->object = new Xcom_Ebay_Block_Adminhtml_Channel_Edit_Tab_Policy_Accordion_ReturnMock();
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:13,代码来源:ReturnTest.php

示例11: setup

 public function setup()
 {
     parent::setUp();
     $this->_shipmentMock = $this->mockModel('Mage_Sales_Model_Order_Shipment', array('getIncrementId', 'getAllTracks', 'getOrder'));
     $orderMock = $this->mockModel('Mage_Sales_Model_Order', array('getRealOrderId', 'getBillingAddress', 'getShippingAddress', 'getPayment'));
     $billingAddressMock = $this->mockModel('Mage_Sales_Model_Order_Address', array('getCountryId'));
     $billingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue('US'));
     $paymentMock = $this->mockModel('Mage_Sales_Model_Order_Payment');
     $shippingAddressMock = $this->mockModel('Mage_Sales_Model_Order_Address', array('getCountryId'));
     $shippingAddressMock->expects($this->once())->method('getCountryId')->will($this->returnValue('US'));
     $orderMock->expects($this->once())->method('getBillingAddress')->will($this->returnValue($billingAddressMock));
     $orderMock->expects($this->once())->method('getShippingAddress')->will($this->returnValue($shippingAddressMock));
     $orderMock->expects($this->once())->method('getPayment')->will($this->returnValue($paymentMock));
     $this->_orderMock = $orderMock;
     $this->_track1Mock = $this->mockModel('Mage_Sales_Model_Order_Shipment_Track', array('getNumber', 'getTitle'));
     $this->_track2Mock = $this->mockModel('Mage_Sales_Model_Order_Shipment_Track', array('getNumber', 'getTitle'));
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:17,代码来源:ShipmentTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_object = Mage::helper('xcom_xfabric')->getMessage('marketplace/country/search');
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:5,代码来源:RequestTest.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_object = new Xcom_Listing_Model_Source_Listing_Status();
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:5,代码来源:StatusTest.php

示例14: setUp

 public function setUp()
 {
     $this->_checkConnection = true;
     parent::setUp();
     $this->_object = new Xcom_Ebay_Block_Adminhtml_Channel_Edit_Tabs();
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:6,代码来源:TabsTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_object = new Xcom_Xfabric_Model_Encoder_Json();
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:5,代码来源:JsonTest.php


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