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_delete_error.phpt ('ldap_delete() - Delete operation 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_delete());
8:
var_dump(ldap_delete($link));
9:
10:
// Too many parameters
11:
var_dump(ldap_delete($link"$base", [], "Additional data"));
12:
13:
// Invalid DN
14:
var_dump(
15:     
ldap_delete($link"weirdAttribute=val"),
16:     
ldap_error($link),
17:     
ldap_errno($link)
18: );
19:
20:
// Deleting unexisting data
21:
var_dump(
22:     
ldap_delete($link"dc=my-domain,$base"),
23:     
ldap_error($link),
24:     
ldap_errno($link)
25: );
26:
?>
27:
===DONE===
28:

Expected

Warning: ldap_delete() expects at least 2 parameters, 0 given in %s on line %d
NULL

Warning: ldap_delete() expects at least 2 parameters, 1 given in %s on line %d
NULL

Warning: ldap_delete() expects at most 3 parameters, 4 given in %s on line %d
NULL

Warning: ldap_delete(): Delete: Invalid DN syntax in %s on line %d
bool(false)
string(17) "Invalid DN syntax"
int(34)

Warning: ldap_delete(): Delete: No such object in %s on line %d
bool(false)
string(14) "No such object"
int(32)
===DONE===

Output

Fatal error: Uncaught ArgumentCountError: ldap_delete() expects at least 2 parameters, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_delete_error.php:7
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_delete_error.php(7): ldap_delete()
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_delete_error.php on line 7

Diff

001+ Fatal error: Uncaught ArgumentCountError: ldap_delete() expects at least 2 parameters, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_delete_error.php:7
002+ Stack trace:
003+ #0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_delete_error.php(7): ldap_delete()
004+ #1 {main}
005+   thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_delete_error.php on line 7
001- Warning: ldap_delete() expects at least 2 parameters, 0 given in %s on line %d
002- NULL
003- 
004- Warning: ldap_delete() expects at least 2 parameters, 1 given in %s on line %d
005- NULL
006- 
007- Warning: ldap_delete() expects at most 3 parameters, 4 given in %s on line %d
008- NULL
009- 
010- Warning: ldap_delete(): Delete: Invalid DN syntax in %s on line %d
011- bool(false)
012- string(17) "Invalid DN syntax"
013- int(34)
014- 
015- Warning: ldap_delete(): Delete: No such object in %s on line %d
016- bool(false)
017- string(14) "No such object"
018- int(32)
019- ===DONE===

 

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

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