Viewing File: /opt/alt/tests/alt-php83-pecl-mongodb_1.18.1-1.el8/tests/readpreference-ctor_error-007.phpt

--TEST--
MongoDB\Driver\ReadPreference construction (combining hedge with primary read preference)
--FILE--
<?php

require_once __DIR__ . '/../utils/basic.inc';

echo throws(function() {
    new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY, null, ['hedge' => ['enabled' => true]]);
}, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n";

?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
hedge may not be used with primary mode
===DONE===
Back to Directory File Manager
<