Fix tests

This commit is contained in:
James Cole
2016-12-25 12:55:22 +01:00
parent 7894f1871e
commit 82718a74dc
9 changed files with 101 additions and 24 deletions

View File

@@ -17,6 +17,7 @@ use Carbon\Carbon;
use FireflyIII\Models\ExportJob;
use FireflyIII\User;
use Illuminate\Support\Str;
use Storage;
/**
* Class ExportJobRepository
@@ -94,6 +95,19 @@ class ExportJobRepository implements ExportJobRepositoryInterface
}
/**
* @param ExportJob $job
*
* @return bool
*/
public function exists(ExportJob $job): bool
{
$disk = Storage::disk('export');
$file = $job->key . '.zip';
return $disk->exists($file);
}
/**
* @param string $key
*
@@ -109,4 +123,17 @@ class ExportJobRepository implements ExportJobRepositoryInterface
return $result;
}
/**
* @param ExportJob $job
*
* @return string
*/
public function getContent(ExportJob $job): string
{
$disk = Storage::disk('export');
$file = $job->key . '.zip';
$content = $disk->get($file);
return $content;
}
}