1--TEST--
2ldap_next_entry() - Basic ldap_first_entry test
3--CREDITS--
4Patrick Allaert <patrickallaert@php.net>
5# Belgian PHP Testfest 2009
6--SKIPIF--
7<?php require_once('skipif.inc'); ?>
8<?php require_once('skipifbindfailure.inc'); ?>
9--FILE--
10<?php
11require "connect.inc";
12
13$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
14insert_dummy_data($link);
15$result = ldap_list($link, "dc=my-domain,dc=com", "(objectClass=person)");
16$entry = ldap_first_entry($link, $result);
17var_dump(
18	$entry = ldap_next_entry($link, $entry),
19	ldap_get_values($link, $entry, 'sn'),
20	$entry = ldap_next_entry($link, $entry)
21);
22?>
23===DONE===
24--CLEAN--
25<?php
26include "connect.inc";
27
28$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
29remove_dummy_data($link);
30?>
31--EXPECTF--
32resource(%d) of type (ldap result entry)
33array(2) {
34  [0]=>
35  string(7) "testSN%d"
36  ["count"]=>
37  int(1)
38}
39bool(false)
40===DONE===
41