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