seed(); $this->seed(); $this->assertDatabaseHas('users', [ 'email' => 'user@example.com', ]); $this->assertDatabaseMissing('users', [ 'email' => 'user@example.com', 'passwordHash' => 'password', ]); $this->assertDatabaseCount('users', 1); $user = app(UserRepository::class)->findByEmail( new EmailAddress('user@example.com'), ); $this->assertNotNull($user); $this->assertTrue(app(PasswordHasher::class)->verify( 'password', $user->getPasswordHash(), )); } }