ldc-arcadia-api/tests/Unit/Domain/Models/ValueObjects/IncoCompo/EnergyTest.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

25 lines
706 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Domain\Models\ValueObjects\IncoCompo;
use Domain\Models\ValueObjects\IncoCompo\Energy;
use Domain\Models\ValueObjects\IncoCompo\EnergyValues;
covers(Energy::class);
describe('Energy Value Object', function (): void {
it('can be instantiated with energy reference and portion values', function (): void {
// GIVEN
$reference = new EnergyValues('100g', '500', '120');
$portion = new EnergyValues('50g', '250', '60');
// WHEN
$energy = new Energy($reference, $portion);
// THEN
expect($energy->reference)->toBe($reference)
->and($energy->portion)->toBe($portion);
});
});