1--TEST-- 2ldap_ldap_control_paged_result() test (fetching the first page) 3--CREDITS-- 4Jean-Sebastien Hedde <jeanseb@au-fil-du.net> 5--SKIPIF-- 6<?php 7require_once('skipif.inc'); 8require_once('skipifbindfailure.inc'); 9?> 10--FILE-- 11<?php 12include "connect.inc"; 13 14$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 15insert_dummy_data($link, $base); 16 17$dn = "$base"; 18$filter = "(cn=user*)"; 19var_dump( 20 ldap_control_paged_result($link, 1), 21 $result = ldap_search($link, $dn, $filter, array('cn')), 22 ldap_get_entries($link, $result) 23); 24?> 25===DONE=== 26--CLEAN-- 27<?php 28include "connect.inc"; 29 30$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 31remove_dummy_data($link, $base); 32?> 33--EXPECTF-- 34bool(true) 35resource(%d) of type (ldap result) 36array(2) { 37 ["count"]=> 38 int(1) 39 [0]=> 40 array(4) { 41 ["cn"]=> 42 array(2) { 43 ["count"]=> 44 int(1) 45 [0]=> 46 string(5) "userA" 47 } 48 [0]=> 49 string(2) "cn" 50 ["count"]=> 51 int(1) 52 ["dn"]=> 53 string(%d) "cn=userA,%s" 54 } 55} 56===DONE=== 57