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

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

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