Skip to content

Commit

Permalink
Added another password hydrator test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Apr 6, 2020
1 parent 14f6287 commit d6dc882
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/EloquentHydratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ public function test_password_hydrator_uses_random_password()
$this->assertFalse(Hash::needsRehash($model->password));
}

public function test_password_hydrator_does_nothing_when_password_column_is_disabled()
{
$entry = new Entry(['bar' => 'baz']);
$model = new TestUserModelStub;
$hydrator = new PasswordHydrator(['password_column' => false]);

$hydrator->hydrate($entry, $model);

$this->assertNull($model->password);
}

public function test_password_hydrator_uses_given_password_when_password_sync_is_enabled()
{
$entry = new Entry(['bar' => 'baz']);
Expand Down

0 comments on commit d6dc882

Please sign in to comment.