1--TEST-- 2ldap_compare() - Testing ldap_compare() that should fail 3--CREDITS-- 4Patrick Allaert <patrickallaert@php.net> 5# Belgian PHP Testfest 2009 6--SKIPIF-- 7<?php require_once('skipif.inc'); ?> 8<?php require_once('skipifbindfailure.inc'); ?> 9--FILE-- 10<?php 11require "connect.inc"; 12 13$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 14insert_dummy_data($link, $base); 15 16var_dump( 17 ldap_compare($link, "cn=userNotAvailable,$base", "sn", "testSN1"), 18 ldap_error($link), 19 ldap_errno($link) 20); 21?> 22--CLEAN-- 23<?php 24include "connect.inc"; 25 26$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 27remove_dummy_data($link, $base); 28?> 29--EXPECTF-- 30Warning: ldap_compare(): Compare: No such object in %s on line %d 31int(-1) 32string(14) "No such object" 33int(32) 34