File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,9 @@ public function createEmailIdentity(array $credentials): void
121121 $ identityModel = model (UserIdentityModel::class);
122122
123123 $ identityModel ->createEmailIdentity ($ this , $ credentials );
124+
125+ // Ensure we will reload all identities
126+ $ this ->identities = null ;
124127 }
125128
126129 /**
Original file line number Diff line number Diff line change @@ -216,4 +216,18 @@ public function testUpdatePasswordHash(): void
216216 'secret2 ' => $ hash ,
217217 ]);
218218 }
219+
220+ public function testCreateEmailIdentity (): void
221+ {
222+ $ identity = $ this ->user ->getEmailIdentity ();
223+ $ this ->assertNull ($ identity );
224+
225+ $ this ->user ->createEmailIdentity ([
226+ 'email ' => 'foo@example.com ' ,
227+ 'password ' => 'passbar ' ,
228+ ]);
229+
230+ $ identity = $ this ->user ->getEmailIdentity ();
231+ $ this ->assertSame ('foo@example.com ' , $ identity ->secret );
232+ }
219233}
You can’t perform that action at this time.
0 commit comments