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_sasl_bind_error.phpt ('ldap_sasl_bind() - Binding that should fail')

Script

1: <?php
2:
require "connect.inc";
3:
4:
$link ldap_connect($host$port);
5:
ldap_set_option($linkLDAP_OPT_PROTOCOL_VERSION$protocol_version);
6:
7:
// Invalid parameter count
8:
var_dump(ldap_sasl_bind());
9:
10:
// Invalid DN
11:
var_dump(ldap_sasl_bind($link"Invalid DN"$passwd'DIGEST-MD5''realm'$sasl_user));
12:
13:
// Invalid user
14:
var_dump(ldap_sasl_bind($linknull"ThisIsNotCorrect$passwd"'DIGEST-MD5'"realm""invalid$sasl_user"));
15:
16:
// Invalid password
17:
var_dump(ldap_sasl_bind($linknull"ThisIsNotCorrect$passwd"'DIGEST-MD5'"realm"$sasl_user));
18:
19:
var_dump(ldap_sasl_bind($linknull$passwd'DIGEST-MD5'"realm""Manager""test"));
20:
21:
// Invalid DN syntax
22:
var_dump(ldap_sasl_bind($link"unexistingProperty=weirdValue,$user"$passwd));
23:
?>
24:
===DONE===
25:

Expected

Warning: ldap_sasl_bind() expects at least 1 parameter, 0 given in %s on line %d
bool(false)

Warning: ldap_sasl_bind(): Unable to bind to server: Invalid DN syntax in %s on line %d
bool(false)

Warning: ldap_sasl_bind(): Unable to bind to server: Invalid credentials in %s on line %d
bool(false)

Warning: ldap_sasl_bind(): Unable to bind to server: Invalid credentials in %s on line %d
bool(false)

Warning: ldap_sasl_bind(): Unable to bind to server: Insufficient access in %s on line %d
bool(false)

Warning: ldap_sasl_bind(): Unable to bind to server: Invalid DN syntax in %s on line %d
bool(false)
===DONE===

Output

Fatal error: Uncaught ArgumentCountError: ldap_sasl_bind() expects at least 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_sasl_bind_error.php:8
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_sasl_bind_error.php(8): ldap_sasl_bind()
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_sasl_bind_error.php on line 8

Diff

001+ Fatal error: Uncaught ArgumentCountError: ldap_sasl_bind() expects at least 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_sasl_bind_error.php:8
002+ Stack trace:
003+ #0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_sasl_bind_error.php(8): ldap_sasl_bind()
004+ #1 {main}
005+   thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_sasl_bind_error.php on line 8
001- Warning: ldap_sasl_bind() expects at least 1 parameter, 0 given in %s on line %d
002- bool(false)
003- 
004- Warning: ldap_sasl_bind(): Unable to bind to server: Invalid DN syntax in %s on line %d
005- bool(false)
006- 
007- Warning: ldap_sasl_bind(): Unable to bind to server: Invalid credentials in %s on line %d
008- bool(false)
009- 
010- Warning: ldap_sasl_bind(): Unable to bind to server: Invalid credentials in %s on line %d
011- bool(false)
012- 
013- Warning: ldap_sasl_bind(): Unable to bind to server: Insufficient access in %s on line %d
014- bool(false)
015- 
016- Warning: ldap_sasl_bind(): Unable to bind to server: Invalid DN syntax in %s on line %d
017- bool(false)
018- ===DONE===

 

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

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