--TEST-- MongoDB\Driver\Manager::executeBulkWrite() cannot combine session with unacknowledged write concern --SKIPIF-- --FILE-- insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, [ 'session' => $manager->startSession(), 'writeConcern' => new MongoDB\Driver\WriteConcern(0), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { $manager = create_test_manager(URI, ['w' => 0]); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, [ 'session' => $manager->startSession(), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern ===DONE===