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