Viewing File: /opt/alt/tests/alt-php84-pecl-mongodb_1.20.0-2.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::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
<