1--TEST-- 2ldap_mod_replace() - ldap_mod_replace() 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_replace($link, "dc=my-domain,$base", array())); 18 19// Invalid DN 20var_dump(ldap_mod_replace($link, "weirdAttribute=val", array())); 21 22// Invalid attributes 23var_dump(ldap_mod_replace($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--EXPECTF-- 32Warning: ldap_mod_replace(): Modify: No such object in %s on line %d 33bool(false) 34 35Warning: ldap_mod_replace(): Modify: Invalid DN syntax in %s on line %d 36bool(false) 37 38Warning: ldap_mod_replace(): Unknown attribute in the data in %s on line %d 39bool(false) 40