--TEST-- ldap_search() - operation that should fail --CREDITS-- Davide Mendolia Belgian PHP Testfest 2009 --EXTENSIONS-- ldap --SKIPIF-- --FILE-- 'top')); var_dump($result); } catch (ValueError $exception) { echo $exception->getMessage() . "\n"; } try { ldap_search(array(), $dn, $filter, array('top')); } catch (ValueError $exception) { echo $exception->getMessage() . "\n"; } try { ldap_search(array($link, $link), array($dn), $filter, array('top')); } catch (ValueError $exception) { echo $exception->getMessage() . "\n"; } try { ldap_search(array($link, $link), $dn, array($filter), array('top')); } catch (ValueError $exception) { echo $exception->getMessage() . "\n"; } try { ldap_search($link, [], []); } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } try { ldap_search($link, "", []); } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } ?> --EXPECTF-- Warning: ldap_search(): Search: No such object in %s on line %d bool(false) ldap_search(): Argument #4 ($attributes) must be a list ldap_search(): Argument #1 ($ldap) must not be empty ldap_search(): Argument #2 ($base) must be the same size as argument #1 ldap_search(): Argument #3 ($filter) must be the same size as argument #1 ldap_search(): Argument #2 ($base) must be of type string when argument #1 ($ldap) is an LDAP\Connection instance ldap_search(): Argument #3 ($filter) must be of type string when argument #1 ($ldap) is an LDAP\Connection instance