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\Composition;
|
2026-08-14 11:33:05 +02:00
|
|
|
|
2026-08-14 15:38:10 +02:00
|
|
|
use Domain\Models\ValueObjects\Inco\Composition\Minerals;
|
2026-08-14 11:33:05 +02:00
|
|
|
|
|
|
|
|
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');
|
|
|
|
|
});
|
|
|
|
|
});
|