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_unbind_error.phpt ('ldap_unbind() - ldap_unbind() operations that should fail')

Script

1: <?php
2:
require "connect.inc";
3:
4:
$link ldap_connect_and_bind($host$port$user$passwd$protocol_version);
5:
6:
// Too few parameters
7:
var_dump(ldap_unbind());
8:
9:
// Too many parameters
10:
var_dump(ldap_unbind($link"Additional data"));
11:
12:
// Bad parameter
13:
var_dump(ldap_unbind("string"));
14:
15:
// unbind twice
16:
var_dump(ldap_unbind($link));
17:
var_dump(ldap_unbind($link));
18:
?>
19:
===DONE===
20:

Expected

Warning: ldap_unbind() expects exactly 1 parameter, 0 given in %s on line %d
bool(false)

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

Warning: ldap_unbind() expects parameter 1 to be resource, string given in %s on line %d
bool(false)
bool(true)

Warning: ldap_unbind(): supplied resource is not a valid ldap link resource in %s on line %d
bool(false)
===DONE===

Output

Fatal error: Uncaught ArgumentCountError: ldap_unbind() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_unbind_error.php:7
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_unbind_error.php(7): ldap_unbind()
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_unbind_error.php on line 7

Diff

001+ Fatal error: Uncaught ArgumentCountError: ldap_unbind() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_unbind_error.php:7
002+ Stack trace:
003+ #0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_unbind_error.php(7): ldap_unbind()
004+ #1 {main}
005+   thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_unbind_error.php on line 7
001- Warning: ldap_unbind() expects exactly 1 parameter, 0 given in %s on line %d
002- bool(false)
003- 
004- Warning: ldap_unbind() expects exactly 1 parameter, 2 given in %s on line %d
005- bool(false)
006- 
007- Warning: ldap_unbind() expects parameter 1 to be resource, string given in %s on line %d
008- bool(false)
009- bool(true)
010- 
011- Warning: ldap_unbind(): supplied resource is not a valid ldap link resource in %s on line %d
012- bool(false)
013- ===DONE===

 

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

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