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===DONE=== 29--CLEAN-- 30<?php 31require "connect.inc"; 32 33$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 34 35ldap_delete($link, "dc=my-domain,$base"); 36?> 37--EXPECT-- 38bool(true) 39bool(false) 40===DONE=== 41