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

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

public it_should_adjust_the_port_if_it_changes_in_the_domain_config ( TcpSocket $tcp )
$tcp LdapTools\Utilities\TcpSocket
    function it_should_adjust_the_port_if_it_changes_in_the_domain_config(TcpSocket $tcp)
    {
        $tcp->connect('foo', 389, 1)->shouldBeCalled()->willReturn(true);
        $tcp->close()->shouldBeCalled();
        $config = new DomainConfiguration('example.com');
        $config->setServers(['foo']);
        $this->beConstructedWith($config, $tcp);
        $this->getServer()->shouldReturn('foo');
        $config->setPort(9001);
        $tcp->connect('foo', 9001, 1)->shouldBeCalled()->willReturn(true);
        $this->getServer()->shouldReturn('foo');
    }