mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-03-25 17:32:28 +01:00
* PHPC-1805: Implement ServerDescription class * PHPC-1910: Implement Server::getServerDescription() * PHPC-1934: Check for uninitialized intern in ServerDescription get_properties_hash * PHPC-1925: Change ServerDescription::getType() to return a string * PHPC-1891: Implement TopologyDescription class * PHPC-1892: Implement SDAMSubscriber interface * PHPC-1893: Implement SDAM event classes * Revise server and topology event classes and tests Use phongo_objectid_init in getTopologyId() methods. Report topologyId as an ObjectId in debug info. Report TopologyDescription servers as ServerDescription in debug info. Copy parameters in phongo_serverdescription_init and phongo_topologydescription_init for consistency with other functions (e.g. phongo_readconcern_init). This also creates phongo_serverdescription_init_ex for when we want to skip copying in Server::getServerDescription(). * PHPC-1953: Add tests for debug handlers * PHPC-1959: Utilize Manager::addSubscriber() in tests Skip TopologyClosedEvent test (pending PHPC-2023) * PHPC-1958: Assert same topologyId for SDAM events * PHPC-2025: Support load balancer in ServerDescription and TopologyDescription * PHPC-2026: Handle 64-bit lastUpdateTime for 32-bit platforms Co-authored-by: Tanli Su <46271307+tanlisu@users.noreply.github.com> Co-authored-by: Andreas Braun <git@alcaeus.org> Co-authored-by: Tanli Su <tanli.su@gmail.com>
20 lines
481 B
PHP
20 lines
481 B
PHP
--TEST--
|
|
MongoDB\Driver\Server::getServerDescription()
|
|
--SKIPIF--
|
|
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
|
|
<?php skip_if_not_live(); ?>
|
|
--FILE--
|
|
<?php
|
|
require_once __DIR__ . "/../utils/basic.inc";
|
|
|
|
$manager = create_test_manager();
|
|
$server = $manager->selectServer(new MongoDB\Driver\ReadPreference('primary'));
|
|
var_dump($server->getServerDescription() instanceof MongoDB\Driver\ServerDescription);
|
|
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECT--
|
|
bool(true)
|
|
===DONE===
|