1--TEST--
2ldap_get_entries() - ldap_get_entries() operation that should fail
3--CREDITS--
4Patrick Allaert <patrickallaert@php.net>
5# Belgian PHP Testfest 2009
6--SKIPIF--
7<?php require_once('skipif.inc'); ?>
8--FILE--
9<?php
10require "connect.inc";
11
12$link = ldap_connect($host, $port);
13
14// Too few parameters
15var_dump(ldap_get_entries($link));
16
17// Too many parameters
18var_dump(ldap_get_entries($link, $link, "Additional data"));
19
20// Bad parameter
21var_dump(ldap_get_entries($link, "string"));
22?>
23===DONE===
24--EXPECTF--
25Warning: ldap_get_entries() expects exactly 2 parameters, 1 given in %s on line %d
26NULL
27
28Warning: ldap_get_entries() expects exactly 2 parameters, 3 given in %s on line %d
29NULL
30
31Warning: ldap_get_entries() expects parameter 2 to be resource, %unicode_string_optional% given in %s on line %d
32NULL
33===DONE===
34