test set persistence

This commit is contained in:
Yisroel Baum 2026-08-03 20:22:05 +03:00
parent 783c522f7e
commit 4ac01460fd
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 136 additions and 0 deletions

View file

@ -0,0 +1,29 @@
<?php
namespace Tests\Unit\Set;
use App\Set\Set;
use App\Shared\ValueObject\EmailAddress;
use App\User\User;
use PHPUnit\Framework\TestCase;
class SetTest extends TestCase
{
public function test_it_exposes_its_identity_name_and_creator(): void
{
$creator = new User(
id: 7,
email: new EmailAddress('creator@example.com'),
passwordHash: 'hashed-password',
);
$set = new Set(
id: 42,
name: 'Bible',
creator: $creator,
);
$this->assertSame(42, $set->getId());
$this->assertSame('Bible', $set->getName());
$this->assertSame($creator, $set->getCreator());
}
}