[PHP-CVS] cvs: php-src(PHP_5_2) /ext/ldap/tests ldap_explode_dn.phpt

2007-12-13 Thread Douglas Goldstein
cardoe  Thu Dec 13 17:46:46 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/ldap/tests ldap_explode_dn.phpt 
  Log:
  expand ldap_explode_dn() tests.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/tests/ldap_explode_dn.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/ldap/tests/ldap_explode_dn.phpt
diff -u php-src/ext/ldap/tests/ldap_explode_dn.phpt:1.3.2.3 
php-src/ext/ldap/tests/ldap_explode_dn.phpt:1.3.2.4
--- php-src/ext/ldap/tests/ldap_explode_dn.phpt:1.3.2.3 Tue Dec 11 17:35:11 2007
+++ php-src/ext/ldap/tests/ldap_explode_dn.phpt Thu Dec 13 17:46:46 2007
@@ -5,22 +5,40 @@
 --FILE--
  characters */
 var_dump(ldap_explode_dn("cn=,dc=example,dc=com", 0));
 
+/* Explode without attributes and < > characters */
 var_dump(ldap_explode_dn("cn=,dc=example,dc=com", 1));
 
+/* Too few parameters */
+ldap_explode_dn("cn=bob,dc=example,dc=com");
+
+/* Too many parameters */
+ldap_explode_dn("cn=bob,dc=example,dc=com", 1, 1);
+
+/* Bad DN value with attributes */
+var_dump(ldap_explode_dn("bob,dc=example,dc=com", 0));
+
+/* Bad DN value without attributes */
+var_dump(ldap_explode_dn("bob,dc=example,dc=com", 1));
+
 echo "Done\n";
 
 ?>
---EXPECT--
+--EXPECTF--
 array(4) {
   ["count"]=>
   int(3)
@@ -67,4 +85,10 @@
 }
 bool(false)
 bool(false)
+
+Warning: Wrong parameter count for ldap_explode_dn() in %s on line %d
+
+Warning: Wrong parameter count for ldap_explode_dn() in %s on line %d
+bool(false)
+bool(false)
 Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/ldap/tests ldap_explode_dn.phpt skipif.inc

2007-12-11 Thread Douglas Goldstein
cardoe  Tue Dec 11 17:35:11 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/ldap/tests skipif.inc 

  Modified files:  
/php-src/ext/ldap/tests ldap_explode_dn.phpt 
  Log:
  add skipif case if the ldap extension is not loaded
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/tests/ldap_explode_dn.phpt?r1=1.3.2.2&r2=1.3.2.3&diff_format=u
Index: php-src/ext/ldap/tests/ldap_explode_dn.phpt
diff -u php-src/ext/ldap/tests/ldap_explode_dn.phpt:1.3.2.2 
php-src/ext/ldap/tests/ldap_explode_dn.phpt:1.3.2.3
--- php-src/ext/ldap/tests/ldap_explode_dn.phpt:1.3.2.2 Tue Dec 11 17:33:51 2007
+++ php-src/ext/ldap/tests/ldap_explode_dn.phpt Tue Dec 11 17:35:11 2007
@@ -1,5 +1,7 @@
 --TEST--
 ldap_explode_dn() test
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/tests/skipif.inc?view=markup&rev=1.1
Index: php-src/ext/ldap/tests/skipif.inc
+++ php-src/ext/ldap/tests/skipif.inc


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php