29 lines
755 B
PHP
29 lines
755 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Dto\OrderReminderLineDto;
|
|
|
|
describe('OrderReminderLineDto', function (): void {
|
|
it('instantiates correctly with valid data', function (): void {
|
|
// GIVEN
|
|
$name = 'Product Name';
|
|
$quantity = 5;
|
|
$priceKgTtc = '15.50';
|
|
$totalTtc = '77.50';
|
|
|
|
// WHEN
|
|
$dto = new OrderReminderLineDto(
|
|
name: $name,
|
|
quantity: $quantity,
|
|
priceKgTtc: $priceKgTtc,
|
|
totalTtc: $totalTtc
|
|
);
|
|
|
|
// THEN
|
|
expect($dto->name)->toBe($name)
|
|
->and($dto->quantity)->toBe($quantity)
|
|
->and($dto->priceKgTtc)->toBe($priceKgTtc)
|
|
->and($dto->totalTtc)->toBe($totalTtc);
|
|
});
|
|
});
|