getServer() public method

Get the LDAP server that the connection is currently connected to.
public getServer ( ) : string | null
return string | null
 function let(LdapConnectionInterface $connection, EventDispatcherInterface $dispatcher, LdapLoggerInterface $logger)
 {
     $connection->getConfig()->willReturn(new DomainConfiguration('example.local'));
     $connection->getConnection()->willReturn(null);
     $connection->isBound()->willReturn(true);
     $connection->getServer()->willReturn('foo');
     $connection->getIdleTime()->willReturn(1);
     $this->setConnection($connection);
     $this->setEventDispatcher($dispatcher);
     $this->setLogger($logger);
 }
 /**
  * @param LdapOperationInterface $operation
  */
 public function setOperationDefaults(LdapOperationInterface $operation)
 {
     if (is_null($operation->getServer())) {
         $operation->setServer($this->connection->getServer());
     }
 }