Ejemplo n.º 1
0
 /**
  * @dataProvider dataProviderisMappingAuto
  * @param $data
  * @param $_result
  */
 protected function isMappingValueAuto($data, $_result)
 {
     $mappingAttributeValue = $this->mockModel('xcom_mapping/attribute_value', array('getByAttributeId'));
     $mappingAttributeValue->expects($this->once())->method('getByAttributeId')->will($this->returnValue($data));
     $result = $this->_object->isMappingValueAuto();
     $this->assertEquals($_result, $result);
 }
Ejemplo n.º 2
0
 public function testGenerateNoChannelOptions()
 {
     $this->mockChannelCollection(array());
     $result = $this->_object->generateChannelOptions();
     $this->assertEquals(1, count($result));
     $this->assertEquals($result[0], array('label' => 'Magento Website', 'value' => 0), "expected empty array");
 }
Ejemplo n.º 3
0
 public function testGetProductBySkuEmpty()
 {
     $sku = 'test_sku_1';
     $product = $this->mockModel('catalog/product', array('getIdBySku'));
     $this->_mockGetIdBySku($product, $sku);
     $result = $this->_object->getProductBySku($sku);
     $this->assertInstanceOf('Mage_Catalog_Model_Product', $result);
 }