Refatoring : Working state

This commit is contained in:
julien
2026-03-16 16:58:54 +01:00
parent 0453697cd3
commit e0f7c77d6e
54 changed files with 287 additions and 279 deletions

View File

@@ -6,7 +6,7 @@ namespace Tests\Media;
use App\Media\Exception\FileTooLargeException;
use App\Media\Exception\StorageException;
use App\Media\MediaRepositoryInterface;
use App\Media\Application\MediaApplicationService as MediaService;
use App\Media\Application\MediaApplicationService;
use App\Media\Infrastructure\LocalMediaStorage;
use App\Post\PostRepositoryInterface;
use PHPUnit\Framework\TestCase;
@@ -24,7 +24,7 @@ final class MediaServiceEdgeCasesTest extends TestCase
$file = $this->createMock(UploadedFileInterface::class);
$file->method('getSize')->willReturn(null);
$service = new MediaService($repo, $postRepo, new LocalMediaStorage('/tmp'), '/media', 1000);
$service = new MediaApplicationService($repo, $postRepo, new LocalMediaStorage('/tmp'), '/media', 1000);
$this->expectException(StorageException::class);
$service->store($file, 1);
@@ -42,7 +42,7 @@ final class MediaServiceEdgeCasesTest extends TestCase
$file->method('getSize')->willReturn(999999);
$file->method('getStream')->willReturn($stream);
$service = new MediaService($repo, $postRepo, new LocalMediaStorage('/tmp'), '/media', 100);
$service = new MediaApplicationService($repo, $postRepo, new LocalMediaStorage('/tmp'), '/media', 100);
$this->expectException(FileTooLargeException::class);
$service->store($file, 1);