test media removal
This commit is contained in:
parent
d0810ba4b3
commit
4b432d9b99
4 changed files with 177 additions and 4 deletions
|
|
@ -12,6 +12,11 @@ class FakeFileUploader implements FileUploader
|
|||
*/
|
||||
public array $uploads = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public array $deletedPaths = [];
|
||||
|
||||
public function upload(FileToUpload $file, string $folder): string
|
||||
{
|
||||
$this->uploads[] = ['file' => $file, 'folder' => $folder];
|
||||
|
|
@ -23,4 +28,9 @@ class FakeFileUploader implements FileUploader
|
|||
{
|
||||
return 'https://test.local/storage/' . $path;
|
||||
}
|
||||
|
||||
public function delete(string $path): void
|
||||
{
|
||||
$this->deletedPaths[] = $path;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue