ldc-mesbr-app/tests/Unit/Domain/Models/ValueObjects/PrintableCoupon/PrintableCouponCodeTest.php
2026-10-14 14:29:06 +02:00

28 lines
750 B
PHP

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