summaryrefslogtreecommitdiff
path: root/ext/ldap/tests/ldap_first_attribute_error.phpt
blob: 79138669bc94c304b07f8a6390d9e1602e6b9c15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
ldap_first_attribute() - Testing ldap_first_attribute() that should fail
--CREDITS--
Patrick Allaert <patrickallaert@php.net>
# Belgian PHP Testfest 2009
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
require "connect.inc";

$link = ldap_connect($host, $port);
try {
    var_dump(ldap_first_attribute($link, $link));
} catch (TypeError $e) {
    echo $e->getMessage(), "\n";
}
?>
--EXPECT--
ldap_first_attribute(): supplied resource is not a valid ldap result entry resource