1--TEST--
2ldap_get_entries() - Basic modify operation
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);
15
16var_dump(
17	ldap_get_entries(
18		$link,
19		ldap_search($link, "dc=my-domain,dc=com", "(o=my-domain)")
20	)
21);
22?>
23===DONE===
24--CLEAN--
25<?php
26require "connect.inc";
27
28$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
29remove_dummy_data($link);
30?>
31--EXPECT--
32array(2) {
33  ["count"]=>
34  int(1)
35  [0]=>
36  array(8) {
37    ["objectclass"]=>
38    array(4) {
39      ["count"]=>
40      int(3)
41      [0]=>
42      string(3) "top"
43      [1]=>
44      string(8) "dcObject"
45      [2]=>
46      string(12) "organization"
47    }
48    [0]=>
49    string(11) "objectclass"
50    ["dc"]=>
51    array(2) {
52      ["count"]=>
53      int(1)
54      [0]=>
55      string(9) "my-domain"
56    }
57    [1]=>
58    string(2) "dc"
59    ["o"]=>
60    array(2) {
61      ["count"]=>
62      int(1)
63      [0]=>
64      string(9) "my-domain"
65    }
66    [2]=>
67    string(1) "o"
68    ["count"]=>
69    int(3)
70    ["dn"]=>
71    string(19) "dc=my-domain,dc=com"
72  }
73}
74===DONE===
75