cvs: php-src /ext/ldap ldap_explode_dn.phpt

From: Date: Tue, 11 Dec 2007 17:21:51 +0000
Subject: cvs: php-src /ext/ldap ldap_explode_dn.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-47453@lists.php.net to get a copy of this message
cardoe Tue Dec 11 17:21:51 2007 UTC Modified files: /php-src/ext/ldap ldap_explode_dn.phpt Log: Adding initial tests for LDAP module. Adding tests for ldap_explode_dn() function http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap_explode_dn.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/ldap/ldap_explode_dn.phpt diff -u /dev/null php-src/ext/ldap/ldap_explode_dn.phpt:1.2 --- /dev/null Tue Dec 11 17:21:51 2007 +++ php-src/ext/ldap/ldap_explode_dn.phpt Tue Dec 11 17:21:51 2007 @@ -0,0 +1,68 @@ +--TEST-- +ldap_explode_dn() test +--FILE-- +<?php + +var_dump(ldap_explode_dn("cn=bob,dc=example,dc=com", 0)); + +var_dump(ldap_explode_dn("cn=bob,ou=users,dc=example,dc=com", 0)); + +var_dump(ldap_explode_dn("cn=bob,dc=example,dc=com", 1)); + +var_dump(ldap_explode_dn("cn=bob,ou=users,dc=example,dc=com", 1)); + +var_dump(ldap_explode_dn("cn=<bob>,dc=example,dc=com", 0)); + +var_dump(ldap_explode_dn("cn=<bob>,dc=example,dc=com", 1)); + +echo "Done\n"; + +?> +--EXPECT-- +array(4) { + ["count"]=> + int(3) + [0]=> + string(6) "cn=bob" + [1]=> + string(10) "dc=example" + [2]=> + string(6) "dc=com" +} +array(5) { + ["count"]=> + int(4) + [0]=> + string(6) "cn=bob" + [1]=> + string(8) "ou=users" + [2]=> + string(10) "dc=example" + [3]=> + string(6) "dc=com" +} +array(4) { + ["count"]=> + int(3) + [0]=> + string(3) "bob" + [1]=> + string(7) "example" + [2]=> + string(3) "com" +} +array(5) { + ["count"]=> + int(4) + [0]=> + string(3) "bob" + [1]=> + string(5) "users" + [2]=> + string(7) "example" + [3]=> + string(3) "com" +} +bool(false) +bool(false) +Done

« previous php.cvs (#47453) next »