--TEST-- MongoDB\Driver\WriteConcernError::getMessage() --SKIPIF-- --FILE-- insert(['x' => 1]); try { /* We assume that the replica set does not have 12 nodes */ $manager->executeBulkWrite(NS, $bulk, ['writeConcern' => new MongoDB\Driver\WriteConcern(12)]); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()->getMessage()); var_dump($e->getWriteResult()->getWriteConcernError()->message); } ?> ===DONE=== --EXPECT-- string(29) "Not enough data-bearing nodes" string(29) "Not enough data-bearing nodes" ===DONE===