test auth contracts
This commit is contained in:
parent
3da9c586c3
commit
b3266b38c8
15 changed files with 457 additions and 165 deletions
|
|
@ -8,12 +8,17 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
class UserTest extends TestCase
|
||||
{
|
||||
public function test_it_exposes_its_identity_and_email(): void
|
||||
public function test_it_exposes_its_identity_email_and_password_hash(): void
|
||||
{
|
||||
$email = new EmailAddress('user@example.com');
|
||||
$user = new User(id: 42, email: $email);
|
||||
$user = new User(
|
||||
id: 42,
|
||||
email: $email,
|
||||
passwordHash: 'hashed-password',
|
||||
);
|
||||
|
||||
$this->assertSame(42, $user->getId());
|
||||
$this->assertSame($email, $user->getEmail());
|
||||
$this->assertSame('hashed-password', $user->getPasswordHash());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue