diff options
author | Ondřej Surý <ondrej@sury.org> | 2010-01-07 13:31:53 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2010-01-07 13:31:53 +0100 |
commit | 0fab6db7cac8d2be99579dd049f812a8ff98e74f (patch) | |
tree | 91f01b0d06916c78262404096bfd466b8e95e5b5 /ext/ldap/tests/ldap_compare_basic.phpt | |
parent | d3a8757891280dc6650ca7eead67830c794b0e7b (diff) | |
download | php-0fab6db7cac8d2be99579dd049f812a8ff98e74f.tar.gz |
Imported Upstream version 5.3.1upstream/5.3.1
Diffstat (limited to 'ext/ldap/tests/ldap_compare_basic.phpt')
-rw-r--r-- | ext/ldap/tests/ldap_compare_basic.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/ldap/tests/ldap_compare_basic.phpt b/ext/ldap/tests/ldap_compare_basic.phpt new file mode 100644 index 000000000..b0c5e97fb --- /dev/null +++ b/ext/ldap/tests/ldap_compare_basic.phpt @@ -0,0 +1,31 @@ +--TEST-- +ldap_compare() - Basic ldap_compare test +--CREDITS-- +Patrick Allaert <patrickallaert@php.net> +# Belgian PHP Testfest 2009 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +<?php require_once('skipifbindfailure.inc'); ?> +--FILE-- +<?php +require "connect.inc"; + +$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); +insert_dummy_data($link); +var_dump( + ldap_compare($link, "cn=userA,dc=my-domain,dc=com", "sn", "testSN1"), + ldap_compare($link, "cn=userA,dc=my-domain,dc=com", "telephoneNumber", "yy-yy-yy-yy-yy") +); +?> +===DONE=== +--CLEAN-- +<?php +include "connect.inc"; + +$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); +remove_dummy_data($link); +?> +--EXPECT-- +bool(true) +bool(false) +===DONE=== |