Skip to content

Commit 494be43

Browse files
committed
test: add test case for bug
1 parent 7f77f12 commit 494be43

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Unit/UserModelTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ public function testSaveInsertUser(): void
4545
]);
4646
}
4747

48+
/**
49+
* @see https://github.com/codeigniter4/shield/issues/546
50+
*/
51+
public function testfindByCredentialsEmailEmptyString(): void
52+
{
53+
$users = $this->createUserModel();
54+
$user = $this->createNewUser();
55+
$users->save($user);
56+
57+
$user = $users->findByCredentials(['email' => '']);
58+
59+
$this->assertNull($user);
60+
}
61+
4862
public function testInsertUserObject(): void
4963
{
5064
$users = $this->createUserModel();

0 commit comments

Comments
 (0)