--TEST-- MongoDB\Driver\TopologyDescription::hasWritableServer() --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->hasWritableServer()); ?> ===DONE=== --EXPECT-- bool(true) ===DONE===