/**
  * Create source adapter mock and set it into model object which tested in this class
  *
  * @param array $columns value which will be returned by method getColNames()
  * @return \Magento\ImportExport\Model\Import\AbstractSource|\PHPUnit_Framework_MockObject_MockObject
  */
 protected function _createSourceAdapterMock(array $columns)
 {
     /** @var $source \Magento\ImportExport\Model\Import\AbstractSource|\PHPUnit_Framework_MockObject_MockObject */
     $source = $this->getMockForAbstractClass('Magento\\ImportExport\\Model\\Import\\AbstractSource', [], '', false, true, true, ['getColNames']);
     $source->expects($this->any())->method('getColNames')->will($this->returnValue($columns));
     $this->_model->setSource($source);
     return $source;
 }
Esempio n. 2
0
 /**
  * Source model setter
  *
  * @param \Magento\ImportExport\Model\Import\AbstractSource $source
  * @return \Magento\ImportExport\Model\Import\AbstractEntity
  */
 public function setSource(\Magento\ImportExport\Model\Import\AbstractSource $source)
 {
     $this->_customerEntity->setSource($source);
     $this->_addressEntity->setSource($source);
     return parent::setSource($source);
 }