1--TEST-- 2ldap_search() 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); 18 19$dn = "dc=my-domain,dc=com"; 20$filter = "(dc=*)"; 21var_dump( 22 $result = ldap_search($link, "dc=my-domain,dc=com", "(dc=*)", array('dc')), 23 ldap_get_entries($link, $result) 24); 25?> 26===DONE=== 27--CLEAN-- 28<?php 29include "connect.inc"; 30 31$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 32remove_dummy_data($link); 33?> 34--EXPECTF-- 35resource(%d) of type (ldap result) 36array(2) { 37 ["count"]=> 38 int(1) 39 [0]=> 40 array(4) { 41 ["dc"]=> 42 array(2) { 43 ["count"]=> 44 int(1) 45 [0]=> 46 string(9) "my-domain" 47 } 48 [0]=> 49 string(2) "dc" 50 ["count"]=> 51 int(1) 52 ["dn"]=> 53 string(19) "dc=my-domain,dc=com" 54 } 55} 56===DONE=== 57