@@ -893,7 +893,7 @@ public function testUpsertDocumentsAttributeMismatch(): void
893893 ]);
894894
895895 // Ensure missing optionals on new document is allowed
896- $ docs = $ database ->createOrUpdateDocuments ($ collectionName , [
896+ $ docs = $ database ->upsertDocuments ($ collectionName , [
897897 $ existingDocument ->setAttribute ('first ' , 'updated ' ),
898898 $ newDocument ,
899899 ]);
@@ -905,7 +905,7 @@ public function testUpsertDocumentsAttributeMismatch(): void
905905 $ this ->assertEquals ('' , $ newDocument ->getAttribute ('last ' ));
906906
907907 try {
908- $ database ->createOrUpdateDocuments ($ collectionName , [
908+ $ database ->upsertDocuments ($ collectionName , [
909909 $ existingDocument ->removeAttribute ('first ' ),
910910 $ newDocument
911911 ]);
@@ -915,7 +915,7 @@ public function testUpsertDocumentsAttributeMismatch(): void
915915 }
916916
917917 // Ensure missing optionals on existing document is allowed
918- $ docs = $ database ->createOrUpdateDocuments ($ collectionName , [
918+ $ docs = $ database ->upsertDocuments ($ collectionName , [
919919 $ existingDocument
920920 ->setAttribute ('first ' , 'first ' )
921921 ->removeAttribute ('last ' ),
@@ -930,7 +930,7 @@ public function testUpsertDocumentsAttributeMismatch(): void
930930 $ this ->assertEquals ('last ' , $ newDocument ->getAttribute ('last ' ));
931931
932932 // Ensure set null on existing document is allowed
933- $ docs = $ database ->createOrUpdateDocuments ($ collectionName , [
933+ $ docs = $ database ->upsertDocuments ($ collectionName , [
934934 $ existingDocument
935935 ->setAttribute ('first ' , 'first ' )
936936 ->setAttribute ('last ' , null ),
@@ -957,7 +957,7 @@ public function testUpsertDocumentsAttributeMismatch(): void
957957 ]);
958958
959959 // Ensure mismatch of attribute orders is allowed
960- $ docs = $ database ->createOrUpdateDocuments ($ collectionName , [
960+ $ docs = $ database ->upsertDocuments ($ collectionName , [
961961 $ doc3 ,
962962 $ doc4
963963 ]);
@@ -6121,7 +6121,7 @@ public function testCreatedByUpdatedBy(): void
61216121 'number ' => 250
61226122 ]);
61236123 if ($ database ->getAdapter ()->getSupportForUpserts ()) {
6124- $ upsertCount = $ database ->createOrUpdateDocuments ($ collection , [$ upsertDoc ]);
6124+ $ upsertCount = $ database ->upsertDocuments ($ collection , [$ upsertDoc ]);
61256125 $ this ->assertEquals (1 , $ upsertCount );
61266126
61276127 $ upsertedDoc = $ database ->getDocument ($ collection , 'test2 ' );
@@ -6136,7 +6136,7 @@ public function testCreatedByUpdatedBy(): void
61366136 '$permissions ' => [Permission::read (Role::any ()), Permission::write (Role::any ()), Permission::update (Role::any ())]
61376137 ]);
61386138
6139- $ upsertNewCount = $ database ->createOrUpdateDocuments ($ collection , [$ upsertNewDoc ]);
6139+ $ upsertNewCount = $ database ->upsertDocuments ($ collection , [$ upsertNewDoc ]);
61406140 $ this ->assertEquals (1 , $ upsertNewCount );
61416141
61426142 $ newUpsertedDoc = $ database ->getDocument ($ collection , 'test5 ' );
0 commit comments