test user persistence
This commit is contained in:
parent
a8a6177a1d
commit
b5697e1e1f
3 changed files with 94 additions and 0 deletions
19
backend/tests/Unit/User/UserTest.php
Normal file
19
backend/tests/Unit/User/UserTest.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit\User;
|
||||
|
||||
use App\Shared\ValueObject\EmailAddress;
|
||||
use App\User\User;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class UserTest extends TestCase
|
||||
{
|
||||
public function test_it_exposes_its_identity_and_email(): void
|
||||
{
|
||||
$email = new EmailAddress('user@example.com');
|
||||
$user = new User(id: 42, email: $email);
|
||||
|
||||
$this->assertSame(42, $user->getId());
|
||||
$this->assertSame($email, $user->getEmail());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue