Exemple #1
0
 /**
  * @dataProvider insertDataProvider
  */
 public function testInsertMultiple($data)
 {
     $this->_connection->insertMultiple($this->_tableName, $data);
     $select = $this->_connection->select()->from($this->_tableName);
     $result = $this->_connection->fetchRow($select);
     $this->assertEquals($data, $result);
 }
Exemple #2
0
 /**
  * Save custom option type values
  *
  * @param array $typeValues option type values
  * @return Mage_ImportExport_Model_Import_Entity_Product_Option
  */
 protected function _saveSpecificTypeValues(array $typeValues)
 {
     $this->_deleteSpecificTypeValues(array_keys($typeValues));
     $typeValueRows = array();
     foreach ($typeValues as $optionId => $optionInfo) {
         foreach ($optionInfo as $row) {
             $row['option_id'] = $optionId;
             $typeValueRows[] = $row;
         }
     }
     if ($typeValueRows) {
         $this->_connection->insertMultiple($this->_tables['catalog_product_option_type_value'], $typeValueRows);
     }
     return $this;
 }