1--TEST--
2ldap_delete() - Basic delete 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);
14ldap_add($link, "dc=my-domain,$base", array(
15    "objectClass"	=> array(
16        "top",
17        "dcObject",
18        "organization"),
19    "dc"			=> "my-domain",
20    "o"				=> "my-domain",
21));
22
23var_dump(
24    ldap_delete($link, "dc=my-domain,$base"),
25    @ldap_search($link, "dc=my-domain,$base", "(o=my-domain)")
26);
27?>
28--CLEAN--
29<?php
30require "connect.inc";
31
32$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
33
34ldap_delete($link, "dc=my-domain,$base");
35?>
36--EXPECT--
37bool(true)
38bool(false)
39