Skip to content

Commit 33c91b5

Browse files
committed
Update tests for invalid BSON in bulk writes
The error message was changed in mongodb/mongo-c-driver@0c9cc9d
1 parent dca4acf commit 33c91b5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tests/bulk/bulkwrite-insert_error-001.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ echo throws(function() use ($bulk) {
2828
<?php exit(0); ?>
2929
--EXPECT--
3030
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
31-
document to insert contains invalid key: empty key
31+
invalid document for insert: empty key
3232

3333
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
34-
document to insert contains invalid key: keys cannot contain ".": "x.y"
34+
invalid document for insert: keys cannot contain ".": "x.y"
3535

3636
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
37-
document to insert contains invalid key: keys cannot begin with "$": "$x"
37+
invalid document for insert: keys cannot begin with "$": "$x"
3838

3939
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
40-
document to insert contains invalid key: corrupt BSON
40+
invalid document for insert: corrupt BSON
4141
===DONE===

tests/bulk/bulkwrite-update_error-001.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ echo throws(function() use ($bulk) {
2828
<?php exit(0); ?>
2929
--EXPECT--
3030
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
31-
replacement document contains invalid key: empty key
31+
invalid argument for replace: empty key
3232

3333
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
34-
replacement document contains invalid key: keys cannot contain ".": "x.y"
34+
invalid argument for replace: keys cannot contain ".": "x.y"
3535

3636
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
37-
replacement document contains invalid key: keys cannot begin with "$": "$x"
37+
invalid argument for replace: keys cannot begin with "$": "$x"
3838

3939
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
40-
replacement document contains invalid key: corrupt BSON
40+
invalid argument for replace: corrupt BSON
4141
===DONE===

tests/bulk/bulkwrite-update_error-002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ echo throws(function() use ($bulk) {
2828
<?php exit(0); ?>
2929
--EXPECT--
3030
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
31-
update document contains invalid key: empty key
31+
invalid argument for update: empty key
3232

3333
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
34-
update document contains invalid key: corrupt BSON
34+
invalid argument for update: corrupt BSON
3535

3636
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
3737
Invalid key 'z': update only works with $ operators

0 commit comments

Comments
 (0)