File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed
Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -248,9 +248,41 @@ public function testUserStorage() {
248248 $ this ->assertTrue (in_array ($ storageUrl , $ user ['storage ' ]));
249249 }
250250
251+ public function testUserExistsById () {
252+ $ newUser = [
253+ "password " => "hello123!@#ABC " ,
254+ 255+ "hello " => "world "
256+ ];
257+ $ createdUser = User::createUser ($ newUser );
258+
259+ $ userExists = User::userIdExists ($ createdUser ['userId ' ]);
260+ $ this ->assertTrue ($ userExists );
261+ }
262+
263+ public function testUserDoesNotExistsById () {
264+ $ userExists = User::userIdExists ("foo " );
265+ $ this ->assertFalse ($ userExists );
266+ }
267+
268+ public function testUserExistsByEmail () {
269+ $ newUser = [
270+ "password " => "hello123!@#ABC " ,
271+ 272+ "hello " => "world "
273+ ];
274+ $ createdUser = User::createUser ($ newUser );
275+
276+ $ userExists = User::userEmailExists ($ newUser ['email ' ]);
277+ $ this ->assertTrue ($ userExists );
278+ }
279+
280+ public function testUserDoesNotExistsByEmail () {
281+ $ userExists = User::
userIdExists (
"[email protected] " );
282+ $ this ->assertFalse ($ userExists );
283+ }
284+
251285 // @TODO Write tests for these functions:
252- // userIdExists
253- // userEmailExists
254286 // deleteAccount
255287 // cleanupTokens
256288}
You can’t perform that action at this time.
0 commit comments