--TEST-- MongoDB\Driver\Manager::executeBulkWrite() with legacy write concern (replica set primary) --SKIPIF-- --FILE-- insert(['wc' => $wc]); $options = [ 'writeConcern' => new MongoDB\Driver\WriteConcern($wc), ]; $result = $manager->executeBulkWrite(NS, $bulk, $options); var_dump($result->isAcknowledged()); var_dump($result->getInsertedCount()); } ?> ===DONE=== --EXPECTF-- bool(false) Deprecated: MongoDB\Driver\WriteResult::getInsertedCount(): Calling MongoDB\Driver\WriteResult::getInsertedCount() for an unacknowledged write is deprecated and will throw an exception in ext-mongodb 2.0 in %s NULL bool(true) int(1) bool(true) int(1) bool(true) int(1) ===DONE===