test(IncoSheets): add test for PaginatedShortIncoSheet instantiation
Added a test to verify the correct instantiation of PaginatedShortIncoSheet from the IncoShortSheet domain entity.
This commit is contained in:
parent
64f2f1c3ca
commit
2900c85b33
1 changed files with 10 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ use Application\Usecase\IncoSheets\FindAll\PaginatedShortIncoSheet;
|
|||
use Application\Usecase\IncoSheets\FindAll\SortColumn;
|
||||
use Application\Usecase\IncoSheets\FindAll\Sorter;
|
||||
use Domain\Models\Entities\Inco\IncoSheet;
|
||||
use Domain\Models\Entities\Inco\IncoShortSheet;
|
||||
use Domain\Models\ValueObjects\Inco\Allegations;
|
||||
use Domain\Models\ValueObjects\Inco\Brand;
|
||||
use Domain\Models\ValueObjects\Inco\IncoId;
|
||||
|
|
@ -91,9 +92,17 @@ describe('FindAllIncoSheets DTOs Instantiation & Logic', function (): void {
|
|||
updatedAt: null,
|
||||
);
|
||||
|
||||
$shortSheet = new IncoShortSheet(
|
||||
id: $incoId,
|
||||
name: 'Poulet Rôti 1kg',
|
||||
label: 'Poulet Rôti Classe A',
|
||||
createdAt: null,
|
||||
updatedAt: null,
|
||||
);
|
||||
|
||||
// WHEN
|
||||
$full = PaginatedIncoSheet::fromDomain($incoSheet);
|
||||
$short = PaginatedShortIncoSheet::fromDomain($incoSheet);
|
||||
$short = PaginatedShortIncoSheet::fromDomain($shortSheet);
|
||||
$output = new Output([$full, $short], 1, 1, 10);
|
||||
|
||||
// THEN
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue