1--TEST-- 2ldap_modify() - Basic modify 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); 14insert_dummy_data($link, $base); 15 16$entry = array( 17 "objectClass" => array( 18 "top", 19 "organization"), 20 "o" => "test", 21 "description" => "Domain description", 22); 23 24var_dump( 25 ldap_modify($link, "o=test,$base", $entry), 26 ldap_get_entries( 27 $link, 28 ldap_search($link, "$base", "(Description=Domain description)") 29 ) 30); 31?> 32===DONE=== 33--CLEAN-- 34<?php 35require "connect.inc"; 36 37$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 38 39remove_dummy_data($link, $base); 40?> 41--EXPECTF-- 42bool(true) 43array(2) { 44 ["count"]=> 45 int(1) 46 [0]=> 47 array(8) { 48 ["objectclass"]=> 49 array(3) { 50 ["count"]=> 51 int(2) 52 [0]=> 53 string(3) "top" 54 [1]=> 55 string(12) "organization" 56 } 57 [0]=> 58 string(11) "objectclass" 59 ["o"]=> 60 array(2) { 61 ["count"]=> 62 int(1) 63 [0]=> 64 string(4) "test" 65 } 66 [1]=> 67 string(1) "o" 68 ["description"]=> 69 array(2) { 70 ["count"]=> 71 int(1) 72 [0]=> 73 string(18) "Domain description" 74 } 75 [2]=> 76 string(11) "description" 77 ["count"]=> 78 int(3) 79 ["dn"]=> 80 string(%d) "o=test,%s" 81 } 82} 83===DONE=== 84