spec\LdapTools\Connection\LdapServerPoolSpec::it_should_throw_an_error_when_no_servers_are_returned_from_dns PHP Метод

it_should_throw_an_error_when_no_servers_are_returned_from_dns() публичный Метод

public it_should_throw_an_error_when_no_servers_are_returned_from_dns ( TcpSocket $tcp, Dns $dns )
$tcp LdapTools\Utilities\TcpSocket
$dns LdapTools\Utilities\Dns
    function it_should_throw_an_error_when_no_servers_are_returned_from_dns(TcpSocket $tcp, Dns $dns)
    {
        $e = new LdapConnectionException('No LDAP servers found via DNS for "example.com".');
        $dns->getRecord("_ldap._tcp.example.com", DNS_SRV)->willReturn(false);
        $config = new DomainConfiguration('example.com');
        $this->beConstructedWith($config, $tcp, $dns);
        $this->shouldThrow($e)->duringGetServer();
    }