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_next_attribute_error.phpt ('ldap_next_attribute() - Testing ldap_next_attribute() that should fail')

Script

1: <?php
2:
require "connect.inc";
3:
4:
$link ldap_connect_and_bind($host$port$user$passwd$protocol_version);
5:
insert_dummy_data($link$base);
6:
$result ldap_search($link"$base""(objectclass=organization)");
7:
$entry ldap_first_entry($link$result);
8:
var_dump(
9:     
ldap_next_attribute($link),
10:     
ldap_next_attribute($link$link),
11:     
ldap_next_attribute($link$entry)
12: );
13:
?>
14:
===DONE===
15:

Expected

Warning: ldap_next_attribute() expects %s 2 parameters, 1 given in %s on line %d

Warning: ldap_next_attribute(): supplied resource is not a valid ldap result entry resource in %s on line %d

Warning: ldap_next_attribute(): called before calling ldap_first_attribute() or no attributes found in result entry in %s on line %d
NULL
bool(false)
bool(false)
===DONE===

Output

Fatal error: Uncaught ArgumentCountError: ldap_next_attribute() expects at least 2 parameters, 1 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_next_attribute_error.php:9
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_next_attribute_error.php(9): ldap_next_attribute(Resource id #5)
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_next_attribute_error.php on line 9

Diff

001+ Fatal error: Uncaught ArgumentCountError: ldap_next_attribute() expects at least 2 parameters, 1 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_next_attribute_error.php:9
002+ Stack trace:
003+ #0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_next_attribute_error.php(9): ldap_next_attribute(Resource id #5)
004+ #1 {main}
005+   thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_next_attribute_error.php on line 9
001- Warning: ldap_next_attribute() expects %s 2 parameters, 1 given in %s on line %d
002- 
003- Warning: ldap_next_attribute(): supplied resource is not a valid ldap result entry resource in %s on line %d
004- 
005- Warning: ldap_next_attribute(): called before calling ldap_first_attribute() or no attributes found in result entry in %s on line %d
006- NULL
007- bool(false)
008- bool(false)
009- ===DONE===

 

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

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