Set the page size used by the LDAP query operation.
public setPageSize ( integer $pageSize ) | ||
$pageSize | integer |
function it_should_use_a_size_limit_with_the_pager_when_paging_is_enabled($pager) { $operation = new QueryOperation('(sAMAccountName=foo)', ['cn']); $operation->setPageSize(10)->setSizeLimit(20)->setUsePaging(true)->setBaseDn('example.local'); $pager->setIsEnabled(true)->shouldBeCalled(); $pager->start(10, 20)->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); }