Optimise tests and coverage.

This commit is contained in:
James Cole
2018-05-13 09:01:10 +02:00
parent 528da3f08e
commit 1aae84a4d0
13 changed files with 154 additions and 106 deletions

View File

@@ -49,7 +49,7 @@ class FakeRoutine implements RoutineInterface
* "ahoy": will log some nonsense and then drop job into status:"need_job_config" to force it back to the job config routine.
* "final": will do some logging, sleep for 10 seconds and then finish. Generates 5 random transactions.
*
* @return bool
* @return void
* @throws FireflyException
*/
public function run(): void
@@ -77,7 +77,7 @@ class FakeRoutine implements RoutineInterface
/** @var StageAhoyHandler $handler */
$handler = app(StageAhoyHandler::class);
$handler->run();
$this->repository->setStatus($this->importJob, 'ready_to_run');
$this->repository->setStatus($this->importJob, 'need_job_config');
$this->repository->setStage($this->importJob, 'final');
break;
case 'final':

View File

@@ -62,7 +62,7 @@ class FileRoutine implements RoutineInterface
return;
}
throw new FireflyException(sprintf('Import routine cannot handle stage "%s"', $this->importJob->stage)); // @codeCoverageIgnore
throw new FireflyException(sprintf('Import routine cannot handle status "%s"', $this->importJob->status)); // @codeCoverageIgnore
}
/**