function it_should_NOT_enable_paging_when_executing_an_operation_that_disables_paging($pager)
{
$operation = new QueryOperation('(sAMAccountName=foo)', ['cn']);
$operation->setUsePaging(false)->setBaseDn('example.local');
$pager->setIsEnabled(false)->shouldBeCalled();
$pager->start(null, 0)->shouldBeCalled();
$pager->next()->shouldBeCalled();
// Cannot simulate this without a connection. But the above control logic will be validated anyway.
$this->shouldThrow('\\LdapTools\\Exception\\LdapConnectionException')->duringExecute($operation);
$operation = new QueryOperation('(sAMAccountName=foo)', ['cn']);
$operation->setScope(QueryOperation::SCOPE['BASE'])->setUsePaging(true)->setBaseDn('example.local');
// Cannot simulate this without a connection. But the above control logic will be validated anyway.
$this->shouldThrow('\\LdapTools\\Exception\\LdapConnectionException')->duringExecute($operation);
}