예제 #1
0
 /**
  * @return $this
  */
 protected function _initTypeModels()
 {
     $entityTypes = ['simple' => ['model' => 'simple_product', 'params' => []]];
     $productTypeInstance = $this->getMockBuilder('\\Magento\\CatalogImportExport\\Model\\Import\\Product\\Type\\AbstractType')->disableOriginalConstructor()->getMock();
     $productTypeInstance->expects($this->once())->method('isSuitable')->willReturn(true);
     $productTypeInstance->expects($this->once())->method('getParticularAttributes')->willReturn([]);
     $productTypeInstance->expects($this->once())->method('getCustomFieldsMapping')->willReturn([]);
     $this->_importConfig->expects($this->once())->method('getEntityTypes')->with(self::ENTITY_TYPE_CODE)->willReturn($entityTypes);
     $this->_productTypeFactory->expects($this->once())->method('create')->willReturn($productTypeInstance);
     return $this;
 }