--TEST-- MongoDB\Driver\Server::executeCommand() with conflicting read preference for secondary --SKIPIF-- --FILE-- selectServer($rp); echo throws(function() use ($secondary) { $rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $secondary->executeCommand(NS, new MongoDB\Driver\Command(array('ping' => 1)), $rp); }, "MongoDB\Driver\Exception\RuntimeException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\RuntimeException not master and slaveOk=false ===DONE===