Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
10 / 10
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
10use Phexium\Domain\Id\TimestampId;
11use Tests\Phexium\Fake\Domain\Event\DomainEvent;
12
13test('getEventId returns the event identifier', function (): void {
14    $eventId = new TimestampId(42);
15
16    $event = new DomainEvent('test-event', $eventId);
17
18    expect($event->getEventId())->toBe($eventId);
19});
20
21test('getEventName returns fully qualified class name', function (): void {
22    $event = new DomainEvent('test-event');
23
24    $eventName = $event->getEventName();
25
26    expect($eventName)->toBe(DomainEvent::class);
27});