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