- 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
38 lines
1 KiB
PHP
38 lines
1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\Domain\Models\ValueObjects\IncoCompo;
|
|
|
|
use Domain\Models\ValueObjects\IncoCompo\Minerals;
|
|
|
|
covers(Minerals::class);
|
|
|
|
describe('Minerals Value Object', function (): void {
|
|
it('can be instantiated with mineral amounts', function (): void {
|
|
// GIVEN & WHEN
|
|
$minerals = new Minerals(
|
|
calcium: '120.0',
|
|
magnesium: '30.0',
|
|
potassium: '300.0',
|
|
phosphorus: '100.0',
|
|
chloride: '0.0',
|
|
iron: '2.5',
|
|
zinc: '1.0',
|
|
copper: '0.1',
|
|
manganese: '0.2',
|
|
selenium: '10.0',
|
|
iodine: '15.0',
|
|
chromium: '0.0',
|
|
molybdenum: '0.0',
|
|
sulfur: '0.0',
|
|
nitrates: '0.0',
|
|
);
|
|
|
|
// THEN
|
|
expect($minerals->calcium)->toBe('120.0')
|
|
->and($minerals->magnesium)->toBe('30.0')
|
|
->and($minerals->iron)->toBe('2.5')
|
|
->and($minerals->potassium)->toBe('300.0');
|
|
});
|
|
});
|