@@ -288,95 +288,6 @@ public function testUpdateUserPassword(array $data):array
288
288
return $ data ;
289
289
}
290
290
291
- /**
292
- * @depends testGetUser
293
- */
294
- public function testUpdateUserName (array $ data ):array
295
- {
296
- /**
297
- * Test for SUCCESS
298
- */
299
- $ user = $ this ->client ->call (Client::METHOD_PATCH , '/users/ ' . $ data ['userId ' ] . '/name ' , array_merge ([
300
- 'content-type ' => 'application/json ' ,
301
- 'x-appwrite-project ' => $ this ->getProject ()['$id ' ],
302
- ], $ this ->getHeaders ()), [
303
- 'name ' => 'Updated name ' ,
304
- ]);
305
-
306
- $ this ->assertEquals ($ user ['headers ' ]['status-code ' ], 200 );
307
- $ this ->assertEquals ($ user ['body ' ]['name ' ], 'Updated name ' );
308
-
309
- $ user = $ this ->client ->call (Client::METHOD_GET , '/users/ ' . $ data ['userId ' ], array_merge ([
310
- 'content-type ' => 'application/json ' ,
311
- 'x-appwrite-project ' => $ this ->getProject ()['$id ' ],
312
- ], $ this ->getHeaders ()));
313
-
314
- $ this ->assertEquals ($ user ['headers ' ]['status-code ' ], 200 );
315
- $ this ->assertEquals ($ user ['body ' ]['name ' ], 'Updated name ' );
316
-
317
- return $ data ;
318
- }
319
-
320
- /**
321
- * @depends testGetUser
322
- */
323
- public function testUpdateUserEmail (array $ data ):array
324
- {
325
- /**
326
- * Test for SUCCESS
327
- */
328
- $ user = $ this ->client ->call (Client::METHOD_PATCH , '/users/ ' . $ data ['userId ' ] . '/email ' , array_merge ([
329
- 'content-type ' => 'application/json ' ,
330
- 'x-appwrite-project ' => $ this ->getProject ()['$id ' ],
331
- ], $ this ->getHeaders ()), [
332
- 'email ' => 'users.service@updated.com ' ,
333
- ]);
334
-
335
- $ this ->assertEquals ($ user ['headers ' ]['status-code ' ], 200 );
336
- $ this ->assertEquals ($ user ['body ' ]['email ' ], 'users.service@updated.com ' );
337
-
338
- $ user = $ this ->client ->call (Client::METHOD_GET , '/users/ ' . $ data ['userId ' ], array_merge ([
339
- 'content-type ' => 'application/json ' ,
340
- 'x-appwrite-project ' => $ this ->getProject ()['$id ' ],
341
- ], $ this ->getHeaders ()));
342
-
343
- $ this ->assertEquals ($ user ['headers ' ]['status-code ' ], 200 );
344
- $ this ->assertEquals ($ user ['body ' ]['email ' ], 'users.service@updated.com ' );
345
-
346
- return $ data ;
347
- }
348
-
349
- /**
350
- * @depends testUpdateUserEmail
351
- */
352
- public function testUpdateUserPassword (array $ data ):array
353
- {
354
- /**
355
- * Test for SUCCESS
356
- */
357
- $ user = $ this ->client ->call (Client::METHOD_PATCH , '/users/ ' . $ data ['userId ' ] . '/password ' , array_merge ([
358
- 'content-type ' => 'application/json ' ,
359
- 'x-appwrite-project ' => $ this ->getProject ()['$id ' ],
360
- ], $ this ->getHeaders ()), [
361
- 'password ' => 'password2 ' ,
362
- ]);
363
-
364
- $ this ->assertEquals ($ user ['headers ' ]['status-code ' ], 200 );
365
- $ this ->assertNotEmpty ($ user ['body ' ]['$id ' ]);
366
-
367
- $ session = $ this ->client ->call (Client::METHOD_POST , '/account/sessions ' , [
368
- 'content-type ' => 'application/json ' ,
369
- 'x-appwrite-project ' => $ this ->getProject ()['$id ' ],
370
- ], [
371
- 'email ' => 'users.service@updated.com ' ,
372
- 'password ' => 'password2 '
373
- ]);
374
-
375
- $ this ->assertEquals ($ session ['headers ' ]['status-code ' ], 201 );
376
-
377
- return $ data ;
378
- }
379
-
380
291
/**
381
292
* @depends testGetUser
382
293
*/
0 commit comments