Skip to content

Commit 84fef1e

Browse files
committed
Added another null check to demonstrate that the very most login is skipped.
1 parent d151ee7 commit 84fef1e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/Unit/UserTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,15 @@ public function testPreviousLogin(): void
123123

124124
// No logins found.
125125
$this->assertNull($this->user->previousLogin());
126-
126+
127127
fake(
128128
LoginModel::class,
129129
['id_type' => 'email', 'identifier' => $this->user->email, 'user_id' => $this->user->id]
130130
);
131+
132+
// The very most login is skipped.
133+
$this->assertNull($this->user->previousLogin());
134+
131135
$login2 = fake(
132136
LoginModel::class,
133137
['id_type' => 'email', 'identifier' => $this->user->email, 'user_id' => $this->user->id]

0 commit comments

Comments
 (0)