--TEST-- MongoDB\Driver\Monitoring\CommandStartedEvent::getServer() --SKIPIF-- --FILE-- getServer()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event): void { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event): void { } } $manager = create_test_manager(); $subscriber = new MySubscriber(); MongoDB\Driver\Monitoring\addSubscriber($subscriber); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand('admin', $command); ?> --EXPECTF-- Deprecated: %r(Function|Method)%r MongoDB\Driver\Monitoring\CommandStartedEvent::getServer() is deprecated in %s object(MongoDB\Driver\Server)#%d (%d) { %A }