php-src/ext/ldap/tests/ldap_list_error.phpt
Côme Bernigaud a5629f8845 Fixed LDAP tests so that base can exists
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)
2015-06-17 13:55:13 +02:00

36 lines
851 B
PHP

--TEST--
ldap_list() - operation that should fail
--CREDITS--
Patrick Allaert <patrickallaert@php.net>
# Belgian PHP Testfest 2009
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
include "connect.inc";
$link = ldap_connect($host, $port);
// Too few parameters
var_dump(ldap_list());
var_dump(ldap_list($link));
var_dump(ldap_list($link, $link));
// Too many parameters
var_dump(ldap_list($link, "$base", "(objectClass=*)", array(), 0, 0, 0, 0 , "Additional data"));
?>
===DONE===
--EXPECTF--
Warning: ldap_list() expects at least 3 parameters, 0 given in %s on line %d
NULL
Warning: ldap_list() expects at least 3 parameters, 1 given in %s on line %d
NULL
Warning: ldap_list() expects at least 3 parameters, 2 given in %s on line %d
NULL
Warning: ldap_list() expects at most 8 parameters, 9 given in %s on line %d
NULL
===DONE===