Example #1
0
 /**
  * Test whether correct methods are invoked in case of custom behaviour for each row in action column
  *
  * @covers Mage_ImportExport_Model_Import_Entity_Eav_Customer::_importData
  */
 public function testImportDataWithCustomBehaviour()
 {
     $this->_model = $this->_getModelMockForTestImportDataWithCustomBehaviour();
     $this->_model->setParameters(array('behavior' => Mage_ImportExport_Model_Import::BEHAVIOR_CUSTOM));
     // validation in validateSaveCustomerEntities and validateDeleteCustomerEntities
     $this->_model->importData();
 }
 /**
  * Check customer email validation for delete behavior
  *
  * @covers Mage_ImportExport_Model_Import_Entity_Eav_Customer::validateRow
  */
 public function testValidateEmailForDeleteBehavior()
 {
     $this->_customerData[Mage_ImportExport_Model_Import_Entity_Eav_Customer::COLUMN_EMAIL] = '*****@*****.**';
     $this->_model->setParameters(array('behavior' => Mage_ImportExport_Model_Import::BEHAVIOR_DELETE));
     $this->_model->validateRow($this->_customerData, 0);
     $this->assertGreaterThan(0, $this->_model->getErrorsCount());
     $this->assertArrayHasKey(Mage_ImportExport_Model_Import_Entity_Eav_Customer::ERROR_CUSTOMER_NOT_FOUND, $this->_model->getErrorMessages());
 }
Example #3
0
 /**
  * Test entity type code value
  *
  * @covers Mage_ImportExport_Model_Import_Entity_Eav_Customer::getAttributeCollection
  */
 public function testGetEntityTypeCode()
 {
     $this->assertEquals('customer', $this->_model->getEntityTypeCode());
 }
Example #4
0
 /**
  * Returns number of checked entities
  *
  * @return int
  */
 public function getProcessedEntitiesCount()
 {
     return $this->_customerEntity->getProcessedEntitiesCount() + $this->_addressEntity->getProcessedEntitiesCount();
 }