25 lines
727 B
PHP
25 lines
727 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\Domain\Models\ValueObjects\Inco\Composition;
|
|
|
|
use Domain\Models\ValueObjects\Inco\Composition\Energy;
|
|
use Domain\Models\ValueObjects\Inco\Composition\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);
|
|
});
|
|
});
|