Expand test coverage.

This commit is contained in:
James Cole
2018-01-05 17:29:42 +01:00
parent c329ffa545
commit 3e9f98b43e
24 changed files with 1150 additions and 93 deletions

View File

@@ -31,6 +31,23 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
*/
interface ImportJobRepositoryInterface
{
/**
* @param ImportJob $job
* @param int $steps
*
* @return ImportJob
*/
public function addStepsDone(ImportJob $job, int $steps = 1): ImportJob;
/**
* Return number of imported rows with this hash value.
*
* @param string $hash
*
* @return int
*/
public function countByHash(string $hash): int;
/**
* @param string $type
*
@@ -38,15 +55,6 @@ interface ImportJobRepositoryInterface
*/
public function create(string $type): ImportJob;
/**
* Return import file content.
*
* @param ImportJob $job
*
* @return string
*/
public function uploadFileContents(ImportJob $job): string;
/**
* @param string $key
*
@@ -63,6 +71,15 @@ interface ImportJobRepositoryInterface
*/
public function getConfiguration(ImportJob $job): array;
/**
* Return extended status of job.
*
* @param ImportJob $job
*
* @return array
*/
public function getExtendedStatus(ImportJob $job): array;
/**
* @param ImportJob $job
* @param UploadedFile $file
@@ -87,6 +104,14 @@ interface ImportJobRepositoryInterface
*/
public function setConfiguration(ImportJob $job, array $configuration): ImportJob;
/**
* @param ImportJob $job
* @param array $array
*
* @return void
*/
public function setExtendedStatus(ImportJob $job, array $array): ImportJob;
/**
* @param User $user
*/
@@ -99,4 +124,13 @@ interface ImportJobRepositoryInterface
* @return ImportJob
*/
public function updateStatus(ImportJob $job, string $status): ImportJob;
/**
* Return import file content.
*
* @param ImportJob $job
*
* @return string
*/
public function uploadFileContents(ImportJob $job): string;
}