From d6dc88217aec79acf9d2b147e15356ba5778fdb1 Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Mon, 6 Apr 2020 10:46:03 -0400 Subject: [PATCH] Added another password hydrator test --- tests/EloquentHydratorTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/EloquentHydratorTest.php b/tests/EloquentHydratorTest.php index 52972e22..5224518d 100644 --- a/tests/EloquentHydratorTest.php +++ b/tests/EloquentHydratorTest.php @@ -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']);