ldc-mesbr-app/tests/Unit/Domain/Models/ValueObjects/PrintableCoupon/PrintedCouponIdTest.php

29 lines
722 B
PHP
Raw Permalink Normal View History

<?php
declare(strict_types=1);
namespace Tests\Unit\Domain\Models\ValueObjects\PrintableCoupon;
use Domain\Models\ValueObjects\PrintableCoupon\PrintedCouponId;
covers(PrintedCouponId::class);
describe('printed coupon id', function (): void {
it('generates a unique campaign id', function (): void {
// WHEN
$id = PrintedCouponId::generate();
// THEN
expect($id)->toBeInstanceOf(PrintedCouponId::class);
});
it('generates different ids on each call', function (): void {
// WHEN
$first = PrintedCouponId::generate();
$second = PrintedCouponId::generate();
// THEN
expect((string) $first)->not->toBe((string) $second);
});
});