ldc-arcadia-api/tests/Unit/Domain/Models/ValueObjects/Inco/AllegationsTest.php

29 lines
860 B
PHP
Raw Permalink Normal View History

<?php
declare(strict_types=1);
namespace Tests\Unit\Domain\Models\ValueObjects\Inco;
use Domain\Models\ValueObjects\Inco\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']);
});
});