Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
opt
/
php-7.1
/
share
/
test
/
mongodb
/
tests
/
standalone
/
//opt/php-7.1/share/test/mongodb/tests/standalone/writeresult-isacknowledged-003.phpt
--TEST-- MongoDB\Driver\WriteResult::isAcknowledged() with custom WriteConcern --SKIPIF-- <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> <?php NEEDS('STANDALONE'); CLEANUP(STANDALONE); ?> --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $manager = new MongoDB\Driver\Manager(STANDALONE); $bulk = new \MongoDB\Driver\BulkWrite; $bulk->insert(array('x' => 2)); $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(0)); printf("WriteResult::isAcknowledged(): %s\n", $result->isAcknowledged() ? 'true' : 'false'); var_dump($result); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- WriteResult::isAcknowledged(): false object(MongoDB\Driver\WriteResult)#%d (%d) { ["nInserted"]=> NULL ["nMatched"]=> NULL ["nModified"]=> NULL ["nRemoved"]=> NULL ["nUpserted"]=> NULL ["upsertedIds"]=> array(0) { } ["writeErrors"]=> array(0) { } ["writeConcernError"]=> NULL ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } } ===DONE===