Annotation of embedaddon/php/ext/ldap/tests/ldap_next_entry_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ldap_next_entry() - Basic ldap_first_entry test
! 3: --CREDITS--
! 4: Patrick 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
! 11: require "connect.inc";
! 12:
! 13: $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
! 14: insert_dummy_data($link);
! 15: $result = ldap_list($link, "dc=my-domain,dc=com", "(objectClass=person)");
! 16: $entry = ldap_first_entry($link, $result);
! 17: var_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
! 26: include "connect.inc";
! 27:
! 28: $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
! 29: remove_dummy_data($link);
! 30: ?>
! 31: --EXPECTF--
! 32: resource(%d) of type (ldap result entry)
! 33: array(2) {
! 34: [0]=>
! 35: string(7) "testSN%d"
! 36: ["count"]=>
! 37: int(1)
! 38: }
! 39: bool(false)
! 40: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>