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