Refatoring : Working state
This commit is contained in:
@@ -7,7 +7,7 @@ use App\Media\Exception\FileTooLargeException;
|
||||
use App\Media\Exception\InvalidMimeTypeException;
|
||||
use App\Media\Media;
|
||||
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\MockObject\MockObject;
|
||||
@@ -16,7 +16,7 @@ use Psr\Http\Message\StreamInterface;
|
||||
use Psr\Http\Message\UploadedFileInterface;
|
||||
|
||||
/**
|
||||
* Tests unitaires pour MediaService.
|
||||
* Tests unitaires pour MediaApplicationService.
|
||||
*
|
||||
* Stratégie : les opérations sur le système de fichiers réel (finfo, GD,
|
||||
* copy, moveTo) sont exercées via de vrais fichiers JPEG temporaires ;
|
||||
@@ -39,7 +39,7 @@ final class MediaServiceTest extends TestCase
|
||||
|
||||
private string $uploadDir;
|
||||
|
||||
private MediaService $service;
|
||||
private MediaApplicationService $service;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
@@ -48,7 +48,7 @@ final class MediaServiceTest extends TestCase
|
||||
$this->uploadDir = sys_get_temp_dir() . '/slim_media_test_' . uniqid();
|
||||
@mkdir($this->uploadDir, 0755, true);
|
||||
|
||||
$this->service = new MediaService(
|
||||
$this->service = new MediaApplicationService(
|
||||
mediaRepository: $this->repository,
|
||||
postRepository: $this->postRepository,
|
||||
mediaStorage: new LocalMediaStorage($this->uploadDir),
|
||||
|
||||
Reference in New Issue
Block a user