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;*/ }
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)))); }
public function setUp() { parent::setUp(); $request = new Varien_Object(); $response = new Varien_Object(); $this->_object = new Xcom_Log_Adminhtml_LogController($request, $response); }
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); }
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'); }
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))); }
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); }
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)); }
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(); }
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(); }
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')); }
public function setUp() { parent::setUp(); $this->_object = Mage::helper('xcom_xfabric')->getMessage('marketplace/country/search'); }
public function setUp() { parent::setUp(); $this->_object = Mage::helper('xcom_xfabric')->getMessage('productTaxonomy/productType/getFailed'); }
public function setUp() { parent::setUp(); $this->_object = Mage::helper('xcom_xfabric')->getMessage('listing/search'); }
public function setUp() { parent::setUp(); $this->_object = Mage::helper('xcom_xfabric')->getMessage('marketplace/returnPolicy/getSucceeded'); }
public function setUp() { parent::setUp(); $this->_object = new Xcom_Listing_Model_Source_Listing_Status(); }
public function setUp() { parent::setUp(); $this->_object = Mage::helper('xcom_xfabric')->getMessage('marketplace/profile/update'); }
public function setUp() { $this->_checkConnection = true; parent::setUp(); $this->_object = new Xcom_Ebay_Block_Adminhtml_Channel_Edit_Tabs(); }
public function setUp() { parent::setUp(); $this->_object = new Xcom_Xfabric_Model_Encoder_Json(); }
public function setUp() { parent::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); }
public function setUp() { parent::setUp(); $this->_object = new Xcom_Listing_Helper_Validator(); }
public function setUp() { parent::setUp(); $this->_object = new Xcom_Initializer_Model_Observer(); }
public function setUp() { parent::setUp(); $this->_object = new Xcom_Xfabric_Model_Message_Response(); }
public function setUp() { parent::setUp(); $this->_mockModel(); }
public function setUp() { parent::setUp(); $this->_object = new Xcom_Mapping_Model_Attribute(); }
public function setUp() { $this->_object = Mage::helper('xcom_xfabric')->getMessage('marketplace/environment/search'); parent::setUp(); }
/** * Set test object * * @return void */ public function setUp() { $this->_checkConnection = true; parent::setUp(); $this->_object = new Xcom_ChannelGroup_Helper_Data(); }
public function tearDown() { parent::tearDown(); $this->_object = null; }
public function setUp() { $this->_object = Mage::getModel('xcom_mmp/policy'); parent::setUp(); }