1--TEST--
2ldap_compare() - Basic ldap_compare test
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);
15var_dump(
16	ldap_compare($link, "cn=userA,dc=my-domain,dc=com", "sn", "testSN1"),
17	ldap_compare($link, "cn=userA,dc=my-domain,dc=com", "telephoneNumber", "yy-yy-yy-yy-yy")
18);
19?>
20===DONE===
21--CLEAN--
22<?php
23include "connect.inc";
24
25$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
26remove_dummy_data($link);
27?>
28--EXPECT--
29bool(true)
30bool(false)
31===DONE===
32