feat: ajout de la gestion des URL d'image et de miniature dans les réponses des mangas, avec mise à jour des classes et des tests associés

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-03-28 15:05:13 +01:00
parent 6ea24deacf
commit 7051bf5274
9 changed files with 50 additions and 29 deletions

View File

@@ -7,6 +7,7 @@ use App\Domain\Manga\Application\QueryHandler\GetMangaByIdHandler;
use App\Domain\Manga\Domain\Exception\MangaNotFoundException;
use App\Domain\Manga\Domain\Model\Manga;
use App\Domain\Manga\Domain\Model\ValueObject\ExternalId;
use App\Domain\Manga\Domain\Model\ValueObject\ImageUrls;
use App\Domain\Manga\Domain\Model\ValueObject\MangaId;
use App\Domain\Manga\Domain\Model\ValueObject\MangaSlug;
use App\Domain\Manga\Domain\Model\ValueObject\MangaTitle;
@@ -36,17 +37,19 @@ class GetMangaByIdHandlerTest extends TestCase
{
// Arrange
$manga = new Manga(
new MangaId('123'),
new MangaTitle('One Piece'),
new MangaSlug('one-piece'),
'Description test',
'Eiichiro Oda',
1997,
['action', 'adventure'],
'ongoing',
new ExternalId('external-123'),
'http://example.com/image.jpg',
4.5
id: new MangaId('123'),
title: new MangaTitle('One Piece'),
slug: new MangaSlug('one-piece'),
description: 'Description test',
author: 'Eiichiro Oda',
publicationYear: 1997,
genres: ['action', 'adventure'],
status: 'ongoing',
externalId: new ExternalId('external-123'),
imageUrl: 'http://example.com/image.jpg',
rating: 4.5,
imageUrls: new ImageUrls('http://example.com/image.jpg', 'http://example.com/thumbnail.jpg'),
createdAt: new \DateTimeImmutable()
);
$this->repository->save($manga);