ldc-arcadia-api/tests/Unit/Domain/Models/ValueObjects/IncoSheets/AllegationsTest.php
Jérémy Munsch 152ee2b5a2
feat(api): add IncoSheets feature with DDD clean architecture, tests & OpenAPI spec
- Use cases: FindAllIncoSheets & FindIncoSheet (filters, pagination, short projection)
- Presentation: controllers, FormRequests with scalar validation, DTOs (camelCase)
- Ports & Adapters: IncoSheetDirectory & EloquentIncoSheetDirectory
- Tests: Pest 4 unit, integration, OpenAPI spectator conformance, dynamic arch tests
- Docs: updated Bruno collection and OpenAPI spec
2026-08-14 11:33:05 +02:00

28 lines
872 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Domain\Models\ValueObjects\IncoSheets;
use Domain\Models\ValueObjects\IncoSheets\Allegations;
covers(Allegations::class);
describe('Allegations Value Object', function (): void {
it('can be instantiated with allegation lists', function (): void {
// GIVEN
$allegations = ['Volaille française'];
$health = ['Bon pour le coeur'];
$nutrition = ['Riche en protéines'];
$other = ['Sans OGM'];
// WHEN
$vo = new Allegations($allegations, $health, $nutrition, $other);
// THEN
expect($vo->allegations())->toBe(['Volaille française'])
->and($vo->health())->toBe(['Bon pour le coeur'])
->and($vo->nutrition())->toBe(['Riche en protéines'])
->and($vo->other())->toBe(['Sans OGM']);
});
});