1--TEST--
2ldap_get_option() - ldap_get_option() 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$option = null;
14
15// Too few parameters
16var_dump(ldap_get_option());
17var_dump(ldap_get_option($link));
18var_dump(ldap_get_option($link, LDAP_OPT_PROTOCOL_VERSION));
19
20// Too many parameters
21var_dump(
22	ldap_get_option($link, LDAP_OPT_PROTOCOL_VERSION, $option, "Additional data"),
23	$option
24);
25?>
26===DONE===
27--EXPECTF--
28Warning: ldap_get_option() expects exactly 3 parameters, 0 given in %s on line %d
29NULL
30
31Warning: ldap_get_option() expects exactly 3 parameters, 1 given in %s on line %d
32NULL
33
34Warning: ldap_get_option() expects exactly 3 parameters, 2 given in %s on line %d
35NULL
36
37Warning: ldap_get_option() expects exactly 3 parameters, 4 given in %s on line %d
38NULL
39NULL
40===DONE===
41