/** * @return bool */ public function perform() { $deltaLogs = $this->groupsReader->getGroups(); $this->progress->start(count($deltaLogs, 1) - count($deltaLogs)); foreach ($deltaLogs as $deltaDocuments) { foreach ($deltaDocuments as $documentName => $idKey) { $this->progress->advance(); if ($this->source->getDocument($documentName)) { $this->source->createDelta($documentName, $idKey); } } } $this->progress->finish(); return true; }
/** * @return void */ public function testCreateDelta() { $this->adapter->expects($this->once())->method('createDelta')->with('spfx_document', 'spfx_m2_cl_document', 'key_field'); $this->config->expects($this->any())->method('getOption')->with(Source::CONFIG_DOCUMENT_PREFIX)->willReturn('spfx_'); $this->resourceSource->createDelta('document', 'key_field'); }