--TEST-- Connect to MongoDB with using default auth mechanism and wrong password --SKIPIF-- --FILE-- insert(array("my" => "value")); echo throws(function() use($manager, $bulk) { $manager->executeBulkWrite(NS, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\AuthenticationException: Authentication failed. ===DONE===