--TEST-- MongoDB\Driver\Manager::executeCommand() does not inherit read preference --SKIPIF-- --FILE-- 'secondary']); $command = new MongoDB\Driver\Command(['ping' => 1]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- is_primary: true is_secondary: false ===DONE===