@@ -49,7 +49,7 @@ private function getUser()
4949 {
5050 // this creates a user on the server
5151 $ user = ["id " => Uuid::uuid4 ()->toString ()];
52- $ response = $ this ->client ->updateUser ($ user );
52+ $ response = $ this ->client ->upsertUser ($ user );
5353 $ this ->assertTrue (array_key_exists ("users " , $ response ));
5454 $ this ->assertTrue (array_key_exists ($ user ["id " ], $ response ["users " ]));
5555 return $ user ;
@@ -78,18 +78,18 @@ public function testUpdateAppSettings()
7878 $ this ->assertTrue (array_key_exists ("duration " , $ response ));
7979 }
8080
81- public function testUpdateUser ()
81+ public function testUpsertUser ()
8282 {
8383 $ user = ["id " => Uuid::uuid4 ()->toString ()];
84- $ response = $ this ->client ->updateUser ($ user );
84+ $ response = $ this ->client ->upsertUser ($ user );
8585 $ this ->assertTrue (array_key_exists ("users " , $ response ));
8686 $ this ->assertTrue (array_key_exists ($ user ["id " ], $ response ["users " ]));
8787 }
8888
89- public function testUpdateUsers ()
89+ public function testUpsertUsers ()
9090 {
9191 $ user = ["id " => Uuid::uuid4 ()->toString ()];
92- $ response = $ this ->client ->updateUsers ([$ user ]);
92+ $ response = $ this ->client ->upsertUsers ([$ user ]);
9393 $ this ->assertTrue (array_key_exists ("users " , $ response ));
9494 $ this ->assertTrue (array_key_exists ($ user ["id " ], $ response ["users " ]));
9595 }
@@ -122,7 +122,7 @@ public function testDeleteUsers()
122122 public function testDeleteChannels ()
123123 {
124124 $ user = ["id " => Uuid::uuid4 ()->toString ()];
125- $ response = $ this ->client ->updateUser ($ user );
125+ $ response = $ this ->client ->upsertUser ($ user );
126126
127127 $ c1 = $ this ->getChannel ();
128128 $ c2 = $ this ->getChannel ();
@@ -186,7 +186,7 @@ public function createFellowship()
186186 ],
187187 ["id " => "peregrin-took " , "name " => "Peregrin Took " , "race " => "Hobbit " , "age " => 28 ],
188188 ];
189- $ this ->client ->updateUsers ($ members );
189+ $ this ->client ->upsertUsers ($ members );
190190 $ user_ids = [];
191191 foreach ($ members as $ user ) {
192192 $ user_ids [] = $ user ['id ' ];
@@ -383,7 +383,7 @@ public function testQueryMembers()
383383 {
384384 $ bob = ["id " => Uuid::uuid4 ()->toString (), "name " => "bob the builder " ];
385385 $ bobSponge = ["id " => Uuid::uuid4 ()->toString (), "name " => "bob the sponge " ];
386- $ this ->client ->updateUsers ([$ bob , $ bobSponge ]);
386+ $ this ->client ->upsertUsers ([$ bob , $ bobSponge ]);
387387 $ channel = $ this ->client ->Channel (
388388 "messaging " ,
389389 Uuid::uuid4 ()->toString (),
@@ -409,7 +409,7 @@ public function testQueryMembersMemberBasedChannel()
409409 {
410410 $ bob = ["id " => Uuid::uuid4 ()->toString (), "name " => "bob the builder " ];
411411 $ bobSponge = ["id " => Uuid::uuid4 ()->toString (), "name " => "bob the sponge " ];
412- $ this ->client ->updateUsers ([$ bob , $ bobSponge ]);
412+ $ this ->client ->upsertUsers ([$ bob , $ bobSponge ]);
413413 $ channel = $ this ->client ->Channel (
414414 "messaging " ,
415415 null ,
@@ -850,7 +850,7 @@ public function testChannelHideShow()
850850 public function testPartialUpdateUsers ()
851851 {
852852 $ carmen = ["id " => Uuid::uuid4 ()->toString (), "name " => "Carmen SanDiego " , "hat " => "blue " , "location " => "Here " ];
853- $ response = $ this ->client ->updateUser ($ carmen );
853+ $ response = $ this ->client ->upsertUser ($ carmen );
854854 $ this ->assertTrue (array_key_exists ("users " , $ response ));
855855 $ this ->assertTrue (array_key_exists ($ carmen ["id " ], $ response ["users " ]));
856856 $ this ->assertSame ($ response ["users " ][$ carmen ["id " ]]["hat " ], "blue " );
@@ -859,7 +859,7 @@ public function testPartialUpdateUsers()
859859 $ this ->assertSame ($ response ["users " ][0 ]["hat " ], "red " );
860860 $ this ->assertSame ($ response ["users " ][0 ]["location " ], "Here " );
861861 $ wally = ["id " => Uuid::uuid4 ()->toString (), "name " => "Wally " , "shirt " => "white " , "location " => "There " ];
862- $ response = $ this ->client ->updateUser ($ wally );
862+ $ response = $ this ->client ->upsertUser ($ wally );
863863 $ response = $ this ->client ->partialUpdateUsers ([
864864 ["id " => $ carmen ["id " ], "set " => ["coat " => "red " ], "unset " => ["location " ]],
865865 ["id " => $ wally ["id " ], "set " => ["shirt " => "striped " ], "unset " => ["location " ]],
0 commit comments