protected function setUp() { /** @var \Magento\TestFramework\ObjectManager $objectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $customerAttributes = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Model\\Resource\\Attribute\\Collection'); $this->_model = $this->getMockForAbstractClass('Magento\\ImportExport\\Model\\Export\\Entity\\AbstractEav', array(), '', false); $this->_model->expects($this->any())->method('getEntityTypeCode')->will($this->returnValue($this->_entityCode)); $this->_model->expects($this->any())->method('getAttributeCollection')->will($this->returnValue($customerAttributes)); $this->_model->__construct($objectManager->get('Magento\\Framework\\App\\Config\\ScopeConfigInterface'), $objectManager->get('Magento\\Store\\Model\\StoreManager'), $objectManager->get('Magento\\ImportExport\\Model\\Export\\Factory'), $objectManager->get('Magento\\ImportExport\\Model\\Resource\\CollectionByPagesIteratorFactory'), $objectManager->get('Magento\\Framework\\Stdlib\\DateTime\\TimezoneInterface'), $objectManager->get('Magento\\Eav\\Model\\Config')); }
/** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory * @param \Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory $resourceColFactory * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerColFactory * @param \Magento\CustomerImportExport\Model\Export\CustomerFactory $eavCustomerFactory * @param \Magento\Customer\Model\Resource\Address\CollectionFactory $addressColFactory * @param array $data * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\ImportExport\Model\Export\Factory $collectionFactory, \Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory $resourceColFactory, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Eav\Model\Config $eavConfig, \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerColFactory, \Magento\CustomerImportExport\Model\Export\CustomerFactory $eavCustomerFactory, \Magento\Customer\Model\Resource\Address\CollectionFactory $addressColFactory, array $data = []) { parent::__construct($scopeConfig, $storeManager, $collectionFactory, $resourceColFactory, $localeDate, $eavConfig, $data); $this->_customerCollection = isset($data['customer_collection']) ? $data['customer_collection'] : $customerColFactory->create(); $this->_customerEntity = isset($data['customer_entity']) ? $data['customer_entity'] : $eavCustomerFactory->create(); $this->_addressCollection = isset($data['address_collection']) ? $data['address_collection'] : $addressColFactory->create(); $this->_initWebsites(true); $this->setFileName($this->getEntityTypeCode()); }
/** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory * @param \Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory $resourceColFactory * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerColFactory * @param array $data */ public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\ImportExport\Model\Export\Factory $collectionFactory, \Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory $resourceColFactory, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Eav\Model\Config $eavConfig, \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerColFactory, array $data = array()) { parent::__construct($scopeConfig, $storeManager, $collectionFactory, $resourceColFactory, $localeDate, $eavConfig, $data); $this->_customerCollection = isset($data['customer_collection']) ? $data['customer_collection'] : $customerColFactory->create(); $this->_initAttributeValues()->_initStores()->_initWebsites(true); }