diff options
Diffstat (limited to 'ext/ldap/tests/ldap_first_entry_error.phpt')
-rw-r--r-- | ext/ldap/tests/ldap_first_entry_error.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/ldap/tests/ldap_first_entry_error.phpt b/ext/ldap/tests/ldap_first_entry_error.phpt new file mode 100644 index 0000000..9f232e0 --- /dev/null +++ b/ext/ldap/tests/ldap_first_entry_error.phpt @@ -0,0 +1,27 @@ +--TEST-- +ldap_first_entry() - Testing ldap_first_entry() that should fail +--CREDITS-- +Patrick Allaert <patrickallaert@php.net> +# Belgian PHP Testfest 2009 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +require "connect.inc"; + +$link = ldap_connect($host, $port); +var_dump(ldap_first_entry($link)); +var_dump(ldap_first_entry($link, $link, "Additional data")); +var_dump(ldap_first_entry($link, $link)); +?> +===DONE=== +--EXPECTF-- +Warning: ldap_first_entry() expects exactly 2 parameters, 1 given in %s on line %d +NULL + +Warning: ldap_first_entry() expects exactly 2 parameters, 3 given in %s on line %d +NULL + +Warning: ldap_first_entry(): supplied resource is not a valid ldap result resource in %s on line %d +bool(false) +===DONE=== |