1--TEST-- 2ldap_next_attribute() - Testing ldap_next_attribute() that should fail 3--CREDITS-- 4Patrick Allaert <patrickallaert@php.net> 5# Belgian PHP Testfest 2009 6--SKIPIF-- 7<?php require_once('skipif.inc'); ?> 8<?php require_once('skipifbindfailure.inc'); ?> 9--FILE-- 10<?php 11require "connect.inc"; 12 13$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 14insert_dummy_data($link, $base); 15$result = ldap_search($link, "$base", "(objectclass=organization)"); 16$entry = ldap_first_entry($link, $result); 17var_dump( 18 ldap_next_attribute($link), 19 ldap_next_attribute($link, $link), 20 ldap_next_attribute($link, $entry) 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-- 32Warning: ldap_next_attribute() expects %s 2 parameters, 1 given in %s on line %d 33 34Warning: ldap_next_attribute(): supplied resource is not a valid ldap result entry resource in %s on line %d 35 36Warning: ldap_next_attribute(): called before calling ldap_first_attribute() or no attributes found in result entry in %s on line %d 37NULL 38bool(false) 39bool(false) 40===DONE=== 41