test media removal

This commit is contained in:
Yisroel Baum 2026-06-02 16:58:00 +03:00
parent d0810ba4b3
commit 4b432d9b99
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
4 changed files with 177 additions and 4 deletions

View file

@ -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;
}
}