mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +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)
32 lines
738 B
PHP
32 lines
738 B
PHP
--TEST--
|
|
ldap_connect() - Connection errors
|
|
--CREDITS--
|
|
Patrick Allaert <patrickallaert@php.net>
|
|
# Belgian PHP Testfest 2009
|
|
--INI--
|
|
ldap.max_links=1
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
require "connect.inc";
|
|
|
|
// too many arguments
|
|
var_dump(ldap_connect(null, null, null));
|
|
var_dump(ldap_connect("ldap://$host:$port/$base"));
|
|
|
|
$links = array();
|
|
$links[0] = ldap_connect($host, $port);
|
|
$links[1] = ldap_connect($host, $port);
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
Warning: ldap_connect() expects at most 2 parameters, 3 given in %s on line %d
|
|
bool(false)
|
|
|
|
Warning: ldap_connect(): Could not create session handle: %s in %s on line %d
|
|
bool(false)
|
|
|
|
Warning: ldap_connect(): Too many open links (1) in %s on line %d
|
|
===DONE===
|