Working state

This commit is contained in:
julien
2026-03-16 13:40:18 +01:00
parent dec76fa2c7
commit 557360dfde
57 changed files with 1044 additions and 1668 deletions

View File

@@ -6,6 +6,7 @@ namespace Tests\Media;
use App\Media\Exception\StorageException;
use App\Media\MediaRepositoryInterface;
use App\Media\MediaService;
use App\Post\PostRepositoryInterface;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\UploadedFileInterface;
@@ -25,7 +26,9 @@ final class MediaServiceInvalidTempPathTest extends TestCase
$file->method('getSize')->willReturn(128);
$file->method('getStream')->willReturn($stream);
$service = new MediaService($repository, sys_get_temp_dir(), '/media', 500000);
$postRepo = $this->createMock(PostRepositoryInterface::class);
$service = new MediaService($repository, $postRepo, sys_get_temp_dir(), '/media', 500000);
$this->expectException(StorageException::class);
$this->expectExceptionMessage('Impossible de localiser le fichier temporaire uploadé');