mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
41 lines
850 B
PHP
41 lines
850 B
PHP
--TEST--
|
|
ldap_delete() - Basic delete operation
|
|
--CREDITS--
|
|
Patrick Allaert <patrickallaert@php.net>
|
|
# Belgian PHP Testfest 2009
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
<?php require_once('skipifbindfailure.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
require "connect.inc";
|
|
|
|
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
|
ldap_add($link, "dc=my-domain,$base", array(
|
|
"objectClass" => array(
|
|
"top",
|
|
"dcObject",
|
|
"organization"),
|
|
"dc" => "my-domain",
|
|
"o" => "my-domain",
|
|
));
|
|
|
|
var_dump(
|
|
ldap_delete($link, "dc=my-domain,$base"),
|
|
@ldap_search($link, "dc=my-domain,$base", "(o=my-domain)")
|
|
);
|
|
?>
|
|
===DONE===
|
|
--CLEAN--
|
|
<?php
|
|
require "connect.inc";
|
|
|
|
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
|
|
|
ldap_delete($link, "dc=my-domain,$base");
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(false)
|
|
===DONE===
|