mirror of
https://github.com/php/php-src.git
synced 2024-12-15 04:45:03 +08:00
a5629f8845
Now you can set the base in the env var LDAP_TEST_BASE. The base has to exists. (before tests were attempting to create/delete the base itself)
31 lines
607 B
PHP
31 lines
607 B
PHP
--TEST--
|
|
ldap_error() - Basic ldap_error() operation
|
|
--CREDITS--
|
|
Patrick Allaert <patrickallaert@php.net>
|
|
# Belgian PHP Testfest 2009
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
<?php require_once('skipifbindfailure.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
require "connect.inc";
|
|
|
|
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
|
@ldap_add($link, "badDN $base", array(
|
|
"objectClass" => array(
|
|
"top",
|
|
"dcObject",
|
|
"organization"),
|
|
"dc" => "my-domain",
|
|
"o" => "my-domain",
|
|
));
|
|
|
|
var_dump(
|
|
ldap_error($link)
|
|
);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
string(17) "Invalid DN syntax"
|
|
===DONE===
|