Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
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\Entity;
12
13test('Entities with same ID are equal', function (): void {
14    $id = TimestampId::from(12345);
15    $entity1 = new Entity($id, 'Name 1');
16    $entity2 = new Entity($id, 'Name 2');
17
18    expect($entity1->equals($entity2))->toBeTrue();
19});