- 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
21 lines
568 B
PHP
21 lines
568 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\Domain\Models\ValueObjects\IncoCompo;
|
|
|
|
use Domain\Models\ValueObjects\IncoCompo\EnergyValues;
|
|
|
|
covers(EnergyValues::class);
|
|
|
|
describe('EnergyValues Value Object', function (): void {
|
|
it('can be instantiated with size, kj and kcal', function (): void {
|
|
// GIVEN & WHEN
|
|
$values = new EnergyValues('100g', '500', '120');
|
|
|
|
// THEN
|
|
expect($values->size)->toBe('100g')
|
|
->and($values->energyKj)->toBe('500')
|
|
->and($values->energyKcal)->toBe('120');
|
|
});
|
|
});
|