Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F618951
bulkwrite-delete_error-004.phpt
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
bulkwrite-delete_error-004.phpt
View Options
--TEST--
MongoDB\Driver\BulkWrite::delete() prohibits PackedArray for document values
--FILE--
<?php
require_once __DIR__ . "/../utils/basic.inc";
$bulk = new MongoDB\Driver\BulkWrite;
echo throws(function() use ($bulk) {
$bulk->delete(MongoDB\BSON\PackedArray::fromPHP([]));
}, MongoDB\Driver\Exception\UnexpectedValueException::class), "\n";
echo throws(function() use ($bulk) {
$bulk->delete([], ['collation' => MongoDB\BSON\PackedArray::fromPHP([])]);
}, MongoDB\Driver\Exception\UnexpectedValueException::class), "\n";
echo throws(function() use ($bulk) {
$bulk->delete([], ['hint' => MongoDB\BSON\PackedArray::fromPHP([])]);
}, MongoDB\Driver\Exception\UnexpectedValueException::class), "\n";
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
MongoDB\BSON\PackedArray cannot be serialized as a root document
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
MongoDB\BSON\PackedArray cannot be serialized as a root document
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
MongoDB\BSON\PackedArray cannot be serialized as a root document
===DONE===
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Nov 14, 4:01 PM (7 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
151923
Default Alt Text
bulkwrite-delete_error-004.phpt (1 KB)
Attached To
Mode
R114 php-mongodb
Attached
Detach File
Event Timeline