1--TEST--
2ldap_get_attributes() - Basic ldap_get_attributes test
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", "(o=test)");
16$entry = ldap_first_entry($link, $result);
17var_dump(
18    ldap_get_attributes($link, $entry)
19);
20?>
21--CLEAN--
22<?php
23include "connect.inc";
24
25$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
26remove_dummy_data($link, $base);
27?>
28--EXPECT--
29array(5) {
30  ["objectClass"]=>
31  array(3) {
32    ["count"]=>
33    int(2)
34    [0]=>
35    string(3) "top"
36    [1]=>
37    string(12) "organization"
38  }
39  [0]=>
40  string(11) "objectClass"
41  ["o"]=>
42  array(2) {
43    ["count"]=>
44    int(1)
45    [0]=>
46    string(4) "test"
47  }
48  [1]=>
49  string(1) "o"
50  ["count"]=>
51  int(2)
52}
53