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