1--TEST--
2ldap_exop_refresh() - Test LDAP refresh extended operation
3--CREDITS--
4Emmanuel Dreyfus <manu@netbsd.org>
5--SKIPIF--
6<?php require_once('skipif.inc'); ?>
7<?php require_once('skipifbindfailure.inc'); ?>
8<?php
9	$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
10	$r = ldap_read($link, '', 'objectClass=*', array('dynamicsubtrees'));
11	$info = ldap_get_entries($link, $r)[0];
12	if (!isset($info['dynamicsubtrees'])) {
13		die("skip Overlay DDS not available");
14	}
15?>
16--FILE--
17<?php
18require "connect.inc";
19
20$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
21
22insert_dummy_data($link, $base);
23ldap_add($link, "cn=tmp,$base", array(
24	"objectclass" => array("person", "dynamicObject"),
25	"cn" => "tmp",
26	"sn" => "tmp"
27));
28var_dump(
29	ldap_exop_refresh($link, "cn=tmp,$base", 1234)
30);
31?>
32===DONE===
33--CLEAN--
34<?php
35include "connect.inc";
36
37$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
38ldap_delete($link, "cn=tmp,$base");
39remove_dummy_data($link, $base);
40?>
41--EXPECT--
42int(1234)
43===DONE===
44