Permalink
Browse files

Update tests for invalid BSON in bulk writes

The error message was changed in mongodb/mongo-c-driver@0c9cc9d
  • Loading branch information...
jmikola committed Dec 12, 2017
1 parent dca4acf commit 33c91b50d437de1d85e2a9b455846d4668e87db4
@@ -28,14 +28,14 @@ echo throws(function() use ($bulk) {
<?php exit(0); ?>
--EXPECT--
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
document to insert contains invalid key: empty key
invalid document for insert: empty key
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
document to insert contains invalid key: keys cannot contain ".": "x.y"
invalid document for insert: keys cannot contain ".": "x.y"
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
document to insert contains invalid key: keys cannot begin with "$": "$x"
invalid document for insert: keys cannot begin with "$": "$x"
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
document to insert contains invalid key: corrupt BSON
invalid document for insert: corrupt BSON
===DONE===
@@ -28,14 +28,14 @@ echo throws(function() use ($bulk) {
<?php exit(0); ?>
--EXPECT--
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
replacement document contains invalid key: empty key
invalid argument for replace: empty key
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
replacement document contains invalid key: keys cannot contain ".": "x.y"
invalid argument for replace: keys cannot contain ".": "x.y"
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
replacement document contains invalid key: keys cannot begin with "$": "$x"
invalid argument for replace: keys cannot begin with "$": "$x"
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
replacement document contains invalid key: corrupt BSON
invalid argument for replace: corrupt BSON
===DONE===
@@ -28,10 +28,10 @@ echo throws(function() use ($bulk) {
<?php exit(0); ?>
--EXPECT--
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
update document contains invalid key: empty key
invalid argument for update: empty key
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
update document contains invalid key: corrupt BSON
invalid argument for update: corrupt BSON
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Invalid key 'z': update only works with $ operators

0 comments on commit 33c91b5

Please sign in to comment.