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_search_error.phpt ('ldap_search() - operation that should fail')

Script

1: <?php
2:
include "connect.inc";
3:
4:
$link ldap_connect($host$port);
5:
6:
$dn "dc=not-found,$base";
7:
$filter "(dc=*)";
8:
9:
$result ldap_search();
10:
var_dump($result);
11:
12:
$result ldap_search($link$dn$filter);
13:
var_dump($result);
14:
15:
$result ldap_search($link$dn$filterNULL);
16:
var_dump($result);
17:
18:
$result ldap_search($link$dn$filter, array(=> 'top'));
19:
var_dump($result);
20:
21:
$result ldap_search(array(), $dn$filter, array('top'));
22:
var_dump($result);
23:
24:
$result ldap_search(array($link$link), array($dn), $filter, array('top'));
25:
var_dump($result);
26:
27:
$result ldap_search(array($link$link), $dn, array($filter), array('top'));
28:
var_dump($result);
29:
?>
30:
===DONE===
31:

Expected

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

Warning: ldap_search(): Search: No such object in %s on line %d
bool(false)

Warning: ldap_search() expects parameter 4 to be array, null given in %s on line %d
NULL

Warning: ldap_search(): Array initialization wrong in %s on line %d
bool(false)

Warning: ldap_search(): No links in link array in %s on line %d
bool(false)

Warning: ldap_search(): Base must either be a string, or an array with the same number of elements as the links array in %s on line %d
bool(false)

Warning: ldap_search(): Filter must either be a string, or an array with the same number of elements as the links array in %s on line %d
bool(false)
===DONE===

Output

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

Diff

001+ Fatal error: Uncaught ArgumentCountError: ldap_search() expects at least 3 parameters, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_search_error.php:9
002+ Stack trace:
003+ #0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_search_error.php(9): ldap_search()
004+ #1 {main}
005+   thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_search_error.php on line 9
001- Warning: ldap_search() expects at least 3 parameters, 0 given in %s on line %d
002- NULL
003- 
004- Warning: ldap_search(): Search: No such object in %s on line %d
005- bool(false)
006- 
007- Warning: ldap_search() expects parameter 4 to be array, null given in %s on line %d
008- NULL
009- 
010- Warning: ldap_search(): Array initialization wrong in %s on line %d
011- bool(false)
012- 
013- Warning: ldap_search(): No links in link array in %s on line %d
014- bool(false)
015- 
016- Warning: ldap_search(): Base must either be a string, or an array with the same number of elements as the links array in %s on line %d
017- bool(false)
018- 
019- Warning: ldap_search(): Filter must either be a string, or an array with the same number of elements as the links array in %s on line %d
020- bool(false)
021- ===DONE===

 

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

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