mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-03-30 21:02:08 +02:00
39 lines
813 B
PHP
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===
|