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
584 B
PHP
31 lines
584 B
PHP
--TEST--
|
|
ldap_errno() - Basic ldap_errno() 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_errno($link)
|
|
);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
int(34)
|
|
===DONE===
|