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