Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F621536
writeresult-getmodifiedcount-001.phpt
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
782 B
Referenced Files
None
Subscribers
None
writeresult-getmodifiedcount-001.phpt
View Options
--TEST--
MongoDB\Driver\WriteResult::getModifiedCount() with acknowledged write
--SKIPIF--
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
<?php skip_if_not_live(); ?>
<?php skip_if_not_clean(); ?>
--FILE--
<?php
require_once __DIR__ . "/../utils/basic.inc";
$manager = create_test_manager();
$bulk = new MongoDB\Driver\BulkWrite;
$bulk->insert(['x' => 1]);
$bulk->update(['x' => 1], ['$set' => ['y' => 3]]);
$bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]);
$bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]);
$bulk->delete(['x' => 1]);
$result = $manager->executeBulkWrite(NS, $bulk);
var_dump($result->getModifiedCount());
var_dump($result->modifiedCount);
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
int(1)
int(1)
===DONE===
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 7:14 PM (19 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
142013
Default Alt Text
writeresult-getmodifiedcount-001.phpt (782 B)
Attached To
Mode
R114 php-mongodb
Attached
Detach File
Event Timeline