--TEST-- MongoDB\Driver\TopologyDescription::hasReadableServer() --SKIPIF-- --FILE-- topologyDescription = $event->getNewDescription(); } public function topologyClosed(MongoDB\Driver\Monitoring\TopologyClosedEvent $event): void {} public function topologyOpening(MongoDB\Driver\Monitoring\TopologyOpeningEvent $event): void {} public function getTopologyDescription() { $manager = create_test_manager(); $manager->addSubscriber($this); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); $manager->removeSubscriber($this); return $this->topologyDescription; } } $subscriber = new TopologyDescriptionProvider; $topologyDescription = $subscriber->getTopologyDescription(); var_dump($topologyDescription->hasReadableServer()); ?> ===DONE=== --EXPECT-- bool(true) ===DONE===