1--TEST--
2ldap_get_attributes() - Basic ldap_get_attributes test
3--CREDITS--
4Patrick Allaert <patrickallaert@php.net>
5# Belgian PHP Testfest 2009
6--EXTENSIONS--
7ldap
8--SKIPIF--
9<?php require_once('skipifbindfailure.inc'); ?>
10--FILE--
11<?php
12require "connect.inc";
13
14$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
15insert_dummy_data($link, $base);
16$result = ldap_search($link, "$base", "(o=test)");
17$entry = ldap_first_entry($link, $result);
18var_dump(
19    ldap_get_attributes($link, $entry)
20);
21?>
22--CLEAN--
23<?php
24include "connect.inc";
25
26$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
27remove_dummy_data($link, $base);
28?>
29--EXPECT--
30array(5) {
31  ["objectClass"]=>
32  array(3) {
33    ["count"]=>
34    int(2)
35    [0]=>
36    string(3) "top"
37    [1]=>
38    string(12) "organization"
39  }
40  [0]=>
41  string(11) "objectClass"
42  ["o"]=>
43  array(2) {
44    ["count"]=>
45    int(1)
46    [0]=>
47    string(4) "test"
48  }
49  [1]=>
50  string(1) "o"
51  ["count"]=>
52  int(2)
53}
54