1--TEST--
2ldap_get_values_len() - Testing ldap_get_values_len() that should fail
3--CREDITS--
4Patrick Allaert <patrickallaert@php.net>
5# Belgian PHP Testfest 2009
6--SKIPIF--
7<?php require_once('skipif.inc'); ?>
8<?php require_once('skipifbindfailure.inc'); ?>
9--FILE--
10<?php
11require "connect.inc";
12
13$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
14insert_dummy_data($link, $base);
15$result = ldap_search($link, "$base", "(objectclass=organization)");
16$entry = ldap_first_entry($link, $result);
17
18var_dump(ldap_get_values_len($link, $entry, "inexistentAttribute"));
19?>
20--CLEAN--
21<?php
22include "connect.inc";
23
24$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
25remove_dummy_data($link, $base);
26?>
27--EXPECTF--
28Warning: ldap_get_values_len(): Cannot get the value(s) of attribute %s in %s on line %d
29bool(false)
30