2026-08-14 11:33:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-08-14 15:38:10 +02:00
|
|
|
namespace Tests\Unit\Domain\Models\ValueObjects\Inco;
|
2026-08-14 11:33:05 +02:00
|
|
|
|
2026-08-14 15:38:10 +02:00
|
|
|
use Domain\Models\ValueObjects\Inco\Allegations;
|
2026-08-14 11:33:05 +02:00
|
|
|
|
|
|
|
|
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']);
|
|
|
|
|
});
|
|
|
|
|
});
|