File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 55use CodeIgniter \Config \Factories ;
66use CodeIgniter \Shield \Authentication \Actions \EmailActivator ;
77use CodeIgniter \Shield \Authentication \Passwords \ValidationRules ;
8+ use CodeIgniter \Shield \Models \UserModel ;
89use CodeIgniter \Test \FeatureTestTrait ;
910use Config \Services ;
1011use Tests \Support \DatabaseTestCase ;
@@ -57,13 +58,15 @@ public function testRegisterActionSuccess()
5758 $ this ->seeInDatabase ('users ' , [
5859 'username ' => 'JohnDoe ' ,
5960 ]);
61+
6062 // User has email/password identity
61- $ user = model (' UserModel ' )->where ('username ' , 'JohnDoe ' )->first (); // @phpstan-ignore-line
63+ $ user = model (UserModel::class )->where ('username ' , 'JohnDoe ' )->first ();
6264 $ this ->seeInDatabase ('auth_identities ' , [
6365 'user_id ' => $ user ->id ,
6466 'type ' => 'email_password ' ,
6567 'secret ' => 'john.doe@example.com ' ,
6668 ]);
69+
6770 // User added to default group
6871 $ this ->assertTrue ($ user ->inGroup (config ('AuthGroups ' )->defaultGroup ));
6972 $ this ->assertFalse ($ user ->inGroup ('admin ' ));
You can’t perform that action at this time.
0 commit comments