Annotation of embedaddon/php/ext/ldap/tests/ldap_error_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ldap_error() - Basic ldap_error() operation
! 3: --CREDITS--
! 4: Patrick 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
! 11: require "connect.inc";
! 12:
! 13: $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
! 14: @ldap_add($link, "badDN dc=my-domain,dc=com", array(
! 15: "objectClass" => array(
! 16: "top",
! 17: "dcObject",
! 18: "organization"),
! 19: "dc" => "my-domain",
! 20: "o" => "my-domain",
! 21: ));
! 22:
! 23: var_dump(
! 24: ldap_error($link)
! 25: );
! 26: ?>
! 27: ===DONE===
! 28: --EXPECT--
! 29: string(17) "Invalid DN syntax"
! 30: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>