• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Xcom_TestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: setUp

 public function setUp()
 {
     parent::setUp();
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:4,代码来源:EndpointTest.php


示例17: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_object = Mage::helper('xcom_xfabric')->getMessage('marketplace/categoryForProductType/searchFailed');
     $this->_object->setEncoding(Xcom_Xfabric_Model_Message_Abstract::AVRO_JSON);
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:6,代码来源:FailedTest.php


示例18: setUp

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


示例19: setUp

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


示例20: setUp

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP XenForo_Application类代码示例发布时间:2022-05-23
下一篇:
PHP X_Env类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap