forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathldap_exop_refresh.phpt
42 lines (39 loc) · 1.02 KB
/
ldap_exop_refresh.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--TEST--
ldap_exop_refresh() - Test LDAP refresh extended operation
--CREDITS--
Emmanuel Dreyfus <[email protected]>
--EXTENSIONS--
ldap
--SKIPIF--
<?php require_once('skipifbindfailure.inc'); ?>
<?php
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
$r = ldap_read($link, '', 'objectClass=*', array('dynamicsubtrees'));
$info = ldap_get_entries($link, $r)[0];
if (!isset($info['dynamicsubtrees'])) {
die("skip Overlay DDS not available");
}
?>
--FILE--
<?php
require "connect.inc";
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
insert_dummy_data($link, $base);
ldap_add($link, "cn=tmp,$base", array(
"objectclass" => array("person", "dynamicObject"),
"cn" => "tmp",
"sn" => "tmp"
));
var_dump(
ldap_exop_refresh($link, "cn=tmp,$base", 1234)
);
?>
--CLEAN--
<?php
include "connect.inc";
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
ldap_delete($link, "cn=tmp,$base");
remove_dummy_data($link, $base);
?>
--EXPECT--
int(1234)