2026-11-02 11:22:59 +01:00
|
|
|
<?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
|
2026-11-16 15:43:10 +01:00
|
|
|
expect($incoId->value)->toBe(140317)
|
2026-11-02 11:22:59 +01:00
|
|
|
->and($incoId->value)->not->toBe(258);
|
|
|
|
|
});
|
|
|
|
|
});
|