test filesystem abstraction

This commit is contained in:
Yisroel Baum 2026-06-26 08:23:17 +03:00
parent bc7937d2b3
commit be2c51bfb7
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
10 changed files with 66 additions and 78 deletions

View file

@ -20,21 +20,21 @@ use App\Exceptions\BadRequestException;
use App\Exceptions\NotFoundException;
use App\Set\Set as DomainSet;
use Tests\Fakes\FakeElementRepository;
use Tests\Fakes\FakeFileUploader;
use Tests\Fakes\FakeFilesystem;
use Tests\TestCase;
class UpdateElementTest extends TestCase
{
private FakeElementRepository $elementRepo;
private FakeFileUploader $fileUploader;
private FakeFilesystem $fileUploader;
private UpdateElement $updateElement;
protected function setUp(): void
{
$this->elementRepo = new FakeElementRepository();
$this->fileUploader = new FakeFileUploader();
$this->fileUploader = new FakeFilesystem();
$this->updateElement = new UpdateElement(
new UpdateTitle($this->elementRepo),
new UpdateDescription($this->elementRepo),