Files
mongo-php-driver/tests/session/session-debug-004.phpt
2019-08-28 20:10:46 +02:00

39 lines
813 B
PHP

--TEST--
MongoDB\Driver\Session debug output (after ending session)
--SKIPIF--
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
<?php skip_if_not_libmongoc_crypto(); ?>
<?php skip_if_not_live(); ?>
<?php skip_if_server_version('<', '3.6'); ?>
--FILE--
<?php
require_once __DIR__ . "/../utils/basic.inc";
$manager = new MongoDB\Driver\Manager(URI);
$session = $manager->startSession();
$command = new MongoDB\Driver\Command(['ping' => 1]);
$manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]);
$session->endSession();
var_dump($session);
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
object(MongoDB\Driver\Session)#%d (%d) {
["logicalSessionId"]=>
NULL
["clusterTime"]=>
NULL
["causalConsistency"]=>
NULL
["operationTime"]=>
NULL
["server"]=>
NULL
}
===DONE===