1--TEST-- 2ldap_read() test 3--CREDITS-- 4Davide Mendolia <idaf1er@gmail.com> 5Patrick Allaert <patrickallaert@php.net> 6Belgian PHP Testfest 2009 7--EXTENSIONS-- 8ldap 9--SKIPIF-- 10<?php 11require_once('skipifbindfailure.inc'); 12?> 13--FILE-- 14<?php 15include "connect.inc"; 16 17$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version); 18insert_dummy_data($link, $base); 19var_dump( 20 $result = ldap_read($link, "o=test,$base", "(o=*)"), 21 ldap_get_entries($link, $result) 22); 23?> 24--CLEAN-- 25<?php 26include "connect.inc"; 27 28$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version); 29remove_dummy_data($link, $base); 30?> 31--EXPECTF-- 32object(LDAP\Result)#%d (0) { 33} 34array(2) { 35 ["count"]=> 36 int(1) 37 [0]=> 38 array(6) { 39 ["objectclass"]=> 40 array(3) { 41 ["count"]=> 42 int(2) 43 [0]=> 44 string(3) "top" 45 [1]=> 46 string(12) "organization" 47 } 48 [0]=> 49 string(11) "objectclass" 50 ["o"]=> 51 array(2) { 52 ["count"]=> 53 int(1) 54 [0]=> 55 string(4) "test" 56 } 57 [1]=> 58 string(1) "o" 59 ["count"]=> 60 int(2) 61 ["dn"]=> 62 string(%d) "o=test,%s" 63 } 64} 65