Download src/php/php-src/ext/ldap/tests/bug77958.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ldap/tests/bug77958.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ldap/tests/bug77958.phpt
-
curl -L -o bug77958.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ldap/tests/bug77958.phpt
1.17 kB
| --TEST-- | |
| ldap_modify_batch() - bug 77958 - values in ldap_modify_batch must be "string" | |
| --CREDITS-- | |
| Côme Chilliet <mcmic@php.net> | |
| --EXTENSIONS-- | |
| ldap | |
| --SKIPIF-- | |
| require_once('skipifbindfailure.inc'); | |
| --FILE-- | |
| require "connect.inc"; | |
| $link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version); | |
| insert_dummy_data($link, $base); | |
| $mods = array( | |
| array( | |
| "attrib" => "telephoneNumber", | |
| "modtype" => LDAP_MODIFY_BATCH_ADD, | |
| "values" => array( | |
| 123456 | |
| ) | |
| ), | |
| array( | |
| "attrib" => "description", | |
| "modtype" => LDAP_MODIFY_BATCH_REMOVE_ALL | |
| ) | |
| ); | |
| var_dump( | |
| ldap_modify_batch($link, "cn=userA,$base", $mods), | |
| $entry = ldap_first_entry($link, ldap_read($link, "cn=userA,$base", "(telephoneNumber=*)")), | |
| ldap_get_values($link, $entry, "telephoneNumber") | |
| ); | |
| --CLEAN-- | |
| require "connect.inc"; | |
| $link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version); | |
| remove_dummy_data($link, $base); | |
| --EXPECTF-- | |
| bool(true) | |
| object(LDAP\ResultEntry)#%d (0) { | |
| } | |
| array(3) { | |
| [0]=> | |
| string(14) "xx-xx-xx-xx-xx" | |
| [1]=> | |
| string(6) "123456" | |
| ["count"]=> | |
| int(2) | |
| } | |