Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
self
/
root
/
opt
/
php-7.3
/
share
/
test
/
mongodb
/
tests
/
manager
/
//proc/self/root/opt/php-7.3/share/test/mongodb/tests/manager/manager-ctor-serverApi-001.phpt
--TEST-- MongoDB\Driver\Manager::__construct(): serverApi driver option --SKIPIF-- <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> <?php skip_if_not_live(); ?> <?php skip_if_server_version('<', '5.0'); ?> --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber { public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); var_dump($command->apiVersion); var_dump(isset($command->apiStrict)); var_dump(isset($command->apiDeprecationErrors)); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $subscriber = new MySubscriber(); $manager = create_test_manager(URI, [], ['serverApi' => new MongoDB\Driver\ServerApi('1')]); MongoDB\Driver\Monitoring\addSubscriber($subscriber); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- string(1) "1" bool(false) bool(false) ===DONE===