spec\LdapTools\Operation\Handler\AuthenticationOperationHandlerSpec::it_should_authenticate_a_user_but_not_reconnect_if_the_connection_wasnt_bound PHP Метод

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

    function it_should_authenticate_a_user_but_not_reconnect_if_the_connection_wasnt_bound($connection)
    {
        $operation = (new AuthenticationOperation())->setUsername('foo')->setPassword('bar');
        $connection->connect('foo', 'bar', false, null)->willReturn($connection);
        $connection->isBound()->willReturn(false);
        $connection->close()->willReturn($connection);
        $this->execute($operation)->shouldReturnAnInstanceOf('\\LdapTools\\Operation\\AuthenticationResponse');
    }