1--TEST--
2ldap_delete() - Basic delete operation
3--CREDITS--
4Patrick Allaert <patrickallaert@php.net>
5# Belgian PHP Testfest 2009
6--EXTENSIONS--
7ldap
8--SKIPIF--
9<?php require_once('skipifbindfailure.inc'); ?>
10--FILE--
11<?php
12require "connect.inc";
13
14$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
15ldap_add($link, "dc=my-domain,$base", array(
16    "objectClass"	=> array(
17        "top",
18        "dcObject",
19        "organization"),
20    "dc"			=> "my-domain",
21    "o"				=> "my-domain",
22));
23
24var_dump(
25    ldap_delete($link, "dc=my-domain,$base"),
26    @ldap_search($link, "dc=my-domain,$base", "(o=my-domain)")
27);
28?>
29--CLEAN--
30<?php
31require "connect.inc";
32
33$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
34
35@ldap_delete($link, "dc=my-domain,$base");
36?>
37--EXPECT--
38bool(true)
39bool(false)
40