Files
mongo-php-driver/tests/serverDescription/serverDescription-getLastUpdateTime-001.phpt
Jeremy Mikola 10b3a1fe70 PHPC-1150: SDAM Monitoring (#1289)
* 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>
2022-01-10 13:14:10 -05:00

22 lines
540 B
PHP

--TEST--
MongoDB\Driver\ServerDescription::getLastUpdateTime()
--SKIPIF--
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
<?php if (8 !== PHP_INT_SIZE) { die('skip Only for 64-bit platform'); } ?>
<?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()->getLastUpdateTime());
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
int(%d)
===DONE===