function it_should_throw_an_exception_when_no_servers_are_available(TcpSocket $tcp)
{
$tcp->connect('foo', 389, 1)->shouldBeCalled()->willReturn(false);
$config = new DomainConfiguration('example.com');
$config->setServers(['foo']);
$this->beConstructedWith($config, $tcp);
$this->shouldThrow(new LdapConnectionException('No LDAP server is available.'))->duringGetServer();
}