Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
13 / 13
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3// ╔════════════════════════════════════════════════════════════╗
4// ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║
5// ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com>     ║
6// ╚════════════════════════════════════════════════════════════╝
7
8declare(strict_types=1);
9
10pest()->group('unit');
11
12use Phexium\Domain\Id\TimestampId;
13use Tests\Phexium\Fake\Domain\Event\DomainEvent;
14
15describe('Properties', function (): void {
16    it('returns the event identifier', function (): void {
17        $eventId = new TimestampId(42);
18
19        $event = new DomainEvent('test-event', $eventId);
20
21        expect($event->getEventId())->toBe($eventId);
22    });
23
24    it('returns fully qualified class name as event name', function (): void {
25        $event = new DomainEvent('test-event');
26
27        $eventName = $event->getEventName();
28
29        expect($eventName)->toBe(DomainEvent::class);
30    });
31});