1--TEST--
2ldap_ldap_control_paged_result() test (fetching the first page with a pagesize=2)
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, 2),
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--
34Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
35bool(true)
36resource(%d) of type (ldap result)
37array(3) {
38  ["count"]=>
39  int(2)
40  [0]=>
41  array(4) {
42    ["cn"]=>
43    array(2) {
44      ["count"]=>
45      int(1)
46      [0]=>
47      string(5) "userA"
48    }
49    [0]=>
50    string(2) "cn"
51    ["count"]=>
52    int(1)
53    ["dn"]=>
54    string(%d) "cn=userA,%s"
55  }
56  [1]=>
57  array(4) {
58    ["cn"]=>
59    array(2) {
60      ["count"]=>
61      int(1)
62      [0]=>
63      string(5) "userB"
64    }
65    [0]=>
66    string(2) "cn"
67    ["count"]=>
68    int(1)
69    ["dn"]=>
70    string(%d) "cn=userB,%s"
71  }
72}
73===DONE===
74