Пример #1
0
 /**
  * @return void
  */
 public function validateAttributeSetsAndGroups()
 {
     $sourceRecords = $this->helper->getSourceRecordsCount('eav_attribute_set');
     $initialDestRecords = count($this->initialData->getAttributeSets('dest'));
     if ($this->helper->getDestinationRecordsCount('eav_attribute_set') != $sourceRecords + $initialDestRecords) {
         $this->errors[] = 'Mismatch of entities in the document: eav_attribute_set';
     }
     $sourceRecords = $this->helper->getSourceRecordsCount('eav_attribute_group');
     $initialDestRecords = count($this->initialData->getAttributeGroups('dest'));
     if ($this->helper->getDestinationRecordsCount('eav_attribute_group') != $sourceRecords + $initialDestRecords) {
         $this->errors[] = 'Mismatch of entities in the document: eav_attribute_group';
     }
 }
 /**
  * @return void
  */
 public function testGetDestinationRecordsCount()
 {
     $this->map->expects($this->once())->method('getDocumentMap')->with('some_document', MapInterface::TYPE_SOURCE)->will($this->returnValue('some_dest_document'));
     $this->destination->expects($this->once())->method('getRecordsCount')->with('some_dest_document')->will($this->returnValue(5));
     $this->assertEquals(5, $this->helper->getDestinationRecordsCount('some_document'));
 }