/** * @return void */ public function testSaveDataNoFile() { $this->file->expects($this->any())->method('isExists')->will($this->returnValue(false)); $this->file->expects($this->once())->method('saveData'); $step = $this->getMock('\\Migration\\Step\\Map', [], [], '', false); $this->progress->saveResult($step, 'integrity', 'true'); }
/** * @param StageInterface $object * @param string $step * @param string $stage * @return bool */ protected function runStage($object, $step, $stage) { $this->logger->info('started', ['step' => $step, 'stage' => $stage, 'mode' => $this->mode]); if ($this->progress->isCompleted($object, $stage)) { return true; } try { $result = $object->perform(); } catch (\Migration\Exception $e) { $this->logger->error($e->getMessage()); return false; } if ($result && $this->canBeCompleted) { $this->progress->saveResult($object, $stage, $result); } return $result; }