mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 23:50:09 +00:00
Fix tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user