1--TEST-- 2ldap_mod_del() - ldap_mod_del() operations that should fail 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($uri, $user, $passwd, $protocol_version); 15 16// DN not found 17var_dump(ldap_mod_del($link, "dc=my-domain,$base", array())); 18 19// Invalid DN 20var_dump(ldap_mod_del($link, "weirdAttribute=val", array())); 21 22// Invalid attributes 23var_dump(ldap_mod_del($link, "$base", array('dc'))); 24?> 25--CLEAN-- 26<?php 27require "connect.inc"; 28 29$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version); 30 31@ldap_delete($link, "dc=my-domain,$base"); 32?> 33--EXPECTF-- 34Warning: ldap_mod_del(): Modify: No such object in %s on line %d 35bool(false) 36 37Warning: ldap_mod_del(): Modify: Invalid DN syntax in %s on line %d 38bool(false) 39 40Warning: ldap_mod_del(): Unknown attribute in the data in %s on line %d 41bool(false) 42