ldc-cocotte/tests/Integration/WithApp/App/Models/ProductIncoTest.php

24 lines
553 B
PHP
Raw Permalink Normal View History

<?php
declare(strict_types=1);
namespace Tests\Integration\WithApp\App\Models;
use App\Models\ProductInco;
describe('ProductInco model', function (): void {
it('returns IncoId value object using no_art instead of surrogate id', function (): void {
// GIVEN
$inco = new ProductInco();
$inco->id = 258;
$inco->no_art = 140317;
// WHEN
$incoId = $inco->getId();
// THEN
expect($incoId->value)->toBe(140317)
->and($incoId->value)->not->toBe(258);
});
});