--TEST-- MongoDB\Driver\Server::executeWriteCommand() --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); $bw = new MongoDB\Driver\BulkWrite(); $bw->insert(['a' => 1]); $manager->executeBulkWrite(NS, $bw); (new CommandObserver)->observe( function() use ($server) { $command = new MongoDB\Driver\Command([ 'drop' => COLLECTION_NAME, ]); $server->executeWriteCommand( DATABASE_NAME, $command, [ 'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY), ] ); }, function(stdClass $command) { echo "Write Concern: ", $command->writeConcern->w, "\n"; } ); ?> ===DONE=== --EXPECTF-- Write Concern: majority ===DONE===