1--TEST-- 2ldap_error() - Basic ldap_error() operation 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); 14@ldap_add($link, "badDN $base", array( 15 "objectClass" => array( 16 "top", 17 "dcObject", 18 "organization"), 19 "dc" => "my-domain", 20 "o" => "my-domain", 21)); 22 23var_dump( 24 ldap_error($link) 25); 26?> 27===DONE=== 28--EXPECT-- 29string(17) "Invalid DN syntax" 30===DONE=== 31