<?phpnamespaceMongoDB\Tests\Operation;useMongoDB\Operation\ListDatabases;useMongoDB\Tests\CommandObserver;usestdClass;classListDatabasesFunctionalTestextendsFunctionalTestCase{publicfunctiontestSessionOption(){if(version_compare($this->getServerVersion(),'3.6.0','<')){$this->markTestSkipped('Sessions are not supported');}(newCommandObserver)->observe(function(){$operation=newListDatabases(['session'=>$this->createSession()]);$operation->execute($this->getPrimaryServer());},function(stdClass$command){$this->assertObjectHasAttribute('lsid',$command);});}}