File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
ldap /
tests /
ldap_control_paged_results_variation2.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:40 2012 UTC (12 years, 3 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
--TEST--
ldap_ldap_control_paged_result() test (fetching the first page with a pagesize=2)
--CREDITS--
Jean-Sebastien Hedde <jeanseb@au-fil-du.net>
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifbindfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
insert_dummy_data($link);
$dn = "dc=my-domain,dc=com";
$filter = "(cn=*)";
var_dump(
ldap_control_paged_result($link, 2),
$result = ldap_search($link, $dn, $filter, array('cn')),
ldap_get_entries($link, $result)
);
?>
===DONE===
--CLEAN--
<?php
include "connect.inc";
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
remove_dummy_data($link);
?>
--EXPECTF--
bool(true)
resource(6) of type (ldap result)
array(3) {
["count"]=>
int(2)
[0]=>
array(4) {
["cn"]=>
array(2) {
["count"]=>
int(1)
[0]=>
string(5) "userA"
}
[0]=>
string(2) "cn"
["count"]=>
int(1)
["dn"]=>
string(28) "cn=userA,dc=my-domain,dc=com"
}
[1]=>
array(4) {
["cn"]=>
array(2) {
["count"]=>
int(1)
[0]=>
string(5) "userB"
}
[0]=>
string(2) "cn"
["count"]=>
int(1)
["dn"]=>
string(28) "cn=userB,dc=my-domain,dc=com"
}
}
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>