summaryrefslogtreecommitdiff
path: root/ext/ldap/tests/ldap_list_error.phpt
blob: 817622e7252e4085dc980cdd805de2152aaedd85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--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 9 parameters, 10 given in %s on line %d
NULL
===DONE===