/** * @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 testGetSourceRecordsCount() { $this->source->expects($this->once())->method('getRecordsCount')->with('some_document')->will($this->returnValue(5)); $this->assertEquals(5, $this->helper->getSourceRecordsCount('some_document')); }