PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/ldap/tests/ldap_dn2ufn.phpt ('ldap_dn2ufn() test')

Script

1: <?php
2:
3:
/* Convert valid DN */
4:
var_dump(ldap_dn2ufn("cn=bob,dc=example,dc=com"));
5:
6:
/* Convert valid DN */
7:
var_dump(ldap_dn2ufn("cn=bob,ou=users,dc=example,dc=com"));
8:
9:
/* Convert DN with < > characters */
10:
var_dump(ldap_dn2ufn("cn=<bob>,dc=example,dc=com"));
11:
12:
/* Too many parameters */
13:
ldap_dn2ufn("cn=bob,dc=example,dc=com"1);
14:
15:
/* Bad DN value */
16:
var_dump(ldap_dn2ufn("bob,dc=example,dc=com"));
17:
18: echo 
"Done\n";
19:
20:
?>
21:

Expected

string(16) "bob, example.com"
string(23) "bob, users, example.com"
bool(false)

Warning: ldap_dn2ufn() expects exactly 1 parameter, 2 given in %s on line %d
bool(false)
Done

Output

string(16) "bob, example.com"
string(23) "bob, users, example.com"
bool(false)

Fatal error: Uncaught ArgumentCountError: ldap_dn2ufn() expects exactly 1 parameter, 2 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_dn2ufn.php:13
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_dn2ufn.php(13): ldap_dn2ufn('cn=bob,dc=examp...', 1)
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_dn2ufn.php on line 13

Diff

005+ Fatal error: Uncaught ArgumentCountError: ldap_dn2ufn() expects exactly 1 parameter, 2 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_dn2ufn.php:13
006+ Stack trace:
007+ #0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_dn2ufn.php(13): ldap_dn2ufn('cn=bob,dc=examp...', 1)
005- Warning: ldap_dn2ufn() expects exactly 1 parameter, 2 given in %s on line %d
006- bool(false)
007- Done
008+ #1 {main}
009+   thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_dn2ufn.php on line 13

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (942 days ago)

Copyright © 2005-2021 The PHP Group
All rights reserved.