[PHP-CVS] cvs: php-src /ext/filter/tests 007.phpt 011.phpt 036.phpt 039.phpt /ext/gd/tests image_type_to_mime_type_variation2.phpt /ext/spl/tests bug44615.phpt fastarray_004.phpt fastarray_009.phpt

2008-06-12 Thread Felipe Pena
felipe  Fri Jun 13 00:18:57 2008 UTC

  Modified files:  
/php-src/ext/filter/tests   007.phpt 011.phpt 036.phpt 039.phpt 
/php-src/ext/gd/tests   image_type_to_mime_type_variation2.phpt 
/php-src/ext/spl/tests  bug44615.phpt fastarray_004.phpt 
fastarray_009.phpt fastarray_015.phpt 
fileobject_004.phpt 
regexIterator_setMode_error.phpt 
/php-src/ext/standard/tests/strings bug44703.phpt 
htmlentities-utf.phpt 
htmlentities01.phpt 
htmlentities11.phpt 
htmlentities12.phpt 
htmlentities18.phpt substr.phpt 
  Log:
  - Fixed tests (unicode results, UEXPECT, line endings)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/007.phpt?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/filter/tests/007.phpt
diff -u php-src/ext/filter/tests/007.phpt:1.6 
php-src/ext/filter/tests/007.phpt:1.7
--- php-src/ext/filter/tests/007.phpt:1.6   Wed Apr 18 07:57:31 2007
+++ php-src/ext/filter/tests/007.phpt   Fri Jun 13 00:18:57 2008
@@ -50,7 +50,7 @@
 bool(false)
 bool(false)
 
-Warning: filter_has_var() expects parameter 1 to be long, string given in 
%s007.php on line %d
+Warning: filter_has_var() expects parameter 1 to be long, Unicode string given 
in %s007.php on line %d
 bool(false)
 
 Warning: filter_has_var() expects parameter 1 to be long, array given in 
%s007.php on line %d
@@ -59,6 +59,6 @@
 Warning: filter_has_var() expects parameter 1 to be long, array given in 
%s007.php on line %d
 bool(false)
 
-Warning: filter_has_var() expects parameter 1 to be long, string given in 
%s007.php on line %d
+Warning: filter_has_var() expects parameter 1 to be long, Unicode string given 
in %s007.php on line %d
 bool(false)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/011.phpt?r1=1.8r2=1.9diff_format=u
Index: php-src/ext/filter/tests/011.phpt
diff -u php-src/ext/filter/tests/011.phpt:1.8 
php-src/ext/filter/tests/011.phpt:1.9
--- php-src/ext/filter/tests/011.phpt:1.8   Thu Apr 26 23:42:35 2007
+++ php-src/ext/filter/tests/011.phpt   Fri Jun 13 00:18:57 2008
@@ -40,10 +40,10 @@
 string(29) #60;p#62;string#60;/p#62;
 bool(false)
 
-Warning: filter_var() expects parameter 2 to be long, string given in 
%s011.php on line %d
+Warning: filter_var() expects parameter 2 to be long, Unicode string given in 
%s011.php on line %d
 NULL
 
-Warning: filter_input() expects parameter 3 to be long, string given in 
%s011.php on line %d
+Warning: filter_input() expects parameter 3 to be long, Unicode string given 
in %s011.php on line %d
 NULL
 
 Warning: filter_var() expects at most 3 parameters, 5 given in %s011.php on 
line %d
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/036.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/filter/tests/036.phpt
diff -u php-src/ext/filter/tests/036.phpt:1.3 
php-src/ext/filter/tests/036.phpt:1.4
--- php-src/ext/filter/tests/036.phpt:1.3   Wed Oct  4 11:56:15 2006
+++ php-src/ext/filter/tests/036.phpt   Fri Jun 13 00:18:57 2008
@@ -24,16 +24,16 @@
 ?
 --EXPECTF--
 array(2) {
-  [test1]=
+  [utest1]=
   int(1)
-  [test2]=
+  [utest2]=
   int(1)
 }
 array(2) {
-  [test1]=
+  [utest1]=
   int(1)
-  [test2]=
-  string(1) 1
+  [utest2]=
+  unicode(1) 1
 }
-string(1) 1
+unicode(1) 1
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/039.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/filter/tests/039.phpt
diff -u php-src/ext/filter/tests/039.phpt:1.3 
php-src/ext/filter/tests/039.phpt:1.4
--- php-src/ext/filter/tests/039.phpt:1.3   Tue Dec  5 01:23:42 2006
+++ php-src/ext/filter/tests/039.phpt   Fri Jun 13 00:18:57 2008
@@ -58,9 +58,9 @@
 }
 array(2) {
   [0]=
-  string(1) 1
-  [blah]=
-  string(4) hoho
+  unicode(1) 1
+  [ublah]=
+  unicode(4) hoho
 }
 bool(false)
 bool(false)
@@ -78,16 +78,16 @@
 array(0) {
 }
 array(1) {
-  [var_name]=
+  [uvar_name]=
   NULL
 }
 array(1) {
-  [var_name]=
+  [uvar_name]=
   NULL
 }
 array(1) {
-  [var_name]=
-  string(0) 
+  [uvar_name]=
+  unicode(0) 
 }
 -- (5)
 
@@ -98,20 +98,20 @@
 bool(false)
 bool(false)
 array(1) {
-  []=
-  string(0) 
+  [u]=
+  unicode(0) 
 }
 int(-1)
 bool(false)
 array(1) {
-  []=
-  string(0) 
+  [u]=
+  unicode(0) 
 }
 int(10)
 bool(false)
 array(1) {
-  []=
-  string(0) 
+  [u]=
+  unicode(0) 
 }
-string(0) 
+unicode(0) 
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation2.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/gd/tests/image_type_to_mime_type_variation2.phpt
diff -u php-src/ext/gd/tests/image_type_to_mime_type_variation2.phpt:1.2 
php-src/ext/gd/tests/image_type_to_mime_type_variation2.phpt:1.3
--- php-src/ext/gd/tests/image_type_to_mime_type_variation2.phpt:1.2Tue Jun 
10 18:31:37 2008
+++ 

[PHP-CVS] cvs: php-src /ext/filter/tests 007.phpt 011.phpt

2006-12-08 Thread Ilia Alshanetsky
iliaa   Sat Dec  9 03:18:21 2006 UTC

  Modified files:  
/php-src/ext/filter/tests   007.phpt 011.phpt 
  Log:
  MFB: Fixed tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/007.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/filter/tests/007.phpt
diff -u php-src/ext/filter/tests/007.phpt:1.3 
php-src/ext/filter/tests/007.phpt:1.4
--- php-src/ext/filter/tests/007.phpt:1.3   Wed Oct  4 11:56:15 2006
+++ php-src/ext/filter/tests/007.phpt   Sat Dec  9 03:18:21 2006
@@ -1,11 +1,5 @@
 --TEST--
-input_has_variable()
---SKIPIF--
-?php
-/* TODO: Check why we get warnings 2x */
-die(skip);
-die(error mode cannot be changed via -d);
-?
+filter_has_var()
 --GET--
 a=qweabc=ahref/a
 --POST--
@@ -13,25 +7,25 @@
 --FILE--
 ?php
 
-var_dump(input_has_variable(INPUT_GET, a));
-var_dump(input_has_variable(INPUT_GET, abc));
-var_dump(input_has_variable(INPUT_GET, nonex));
-var_dump(input_has_variable(INPUT_GET,  ));
-var_dump(input_has_variable(INPUT_GET, ));
-var_dump(input_has_variable(INPUT_GET, array()));
-
-var_dump(input_has_variable(INPUT_POST, b));
-var_dump(input_has_variable(INPUT_POST, bbc));
-var_dump(input_has_variable(INPUT_POST, nonex));
-var_dump(input_has_variable(INPUT_POST,  ));
-var_dump(input_has_variable(INPUT_POST, ));
-var_dump(input_has_variable(INPUT_POST, array()));
-
-var_dump(input_has_variable(-1, ));
-var_dump(input_has_variable(, ));
-var_dump(input_has_variable(array(), array()));
-var_dump(input_has_variable(array(), ));
-var_dump(input_has_variable(, array()));
+var_dump(filter_has_var(INPUT_GET, a));
+var_dump(filter_has_var(INPUT_GET, abc));
+var_dump(filter_has_var(INPUT_GET, nonex));
+var_dump(filter_has_var(INPUT_GET,  ));
+var_dump(filter_has_var(INPUT_GET, ));
+var_dump(filter_has_var(INPUT_GET, array()));
+
+var_dump(filter_has_var(INPUT_POST, b));
+var_dump(filter_has_var(INPUT_POST, bbc));
+var_dump(filter_has_var(INPUT_POST, nonex));
+var_dump(filter_has_var(INPUT_POST,  ));
+var_dump(filter_has_var(INPUT_POST, ));
+var_dump(filter_has_var(INPUT_POST, array()));
+
+var_dump(filter_has_var(-1, ));
+var_dump(filter_has_var(, ));
+var_dump(filter_has_var(array(), array()));
+var_dump(filter_has_var(array(), ));
+var_dump(filter_has_var(, array()));
 
 echo Done\n;
 ?
@@ -42,27 +36,27 @@
 bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 2 to be string, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 2 to be string, array given in 
%s/007.php on line %d
+bool(false)
 bool(true)
 bool(true)
 bool(false)
 bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 2 to be string, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 2 to be string, array given in 
%s/007.php on line %d
+bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, string given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, string given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, array given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, array given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, string given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, string given in 
%s/007.php on line %d
+bool(false)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/011.phpt?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/filter/tests/011.phpt
diff -u php-src/ext/filter/tests/011.phpt:1.4 
php-src/ext/filter/tests/011.phpt:1.5
--- php-src/ext/filter/tests/011.phpt:1.4   Wed Oct  4 11:56:15 2006
+++ php-src/ext/filter/tests/011.phpt   Sat Dec  9 03:18:21 2006
@@ -1,11 +1,5 @@
 --TEST--
 input_get()
---SKIPIF--
-?php
-/* TODO: Check why we get warnings 2x */
-die(skip);
-die(error mode cannot be changed via -d);
-?
 --GET--
 a=btest/bb=http://example.com
 --POST--
@@ -13,20 +7,20 @@
 --FILE--
 ?php
 ini_set('html_errors', false);
-var_dump(input_get(INPUT_GET, a, FILTER_SANITIZE_STRIPPED));
-var_dump(input_get(INPUT_GET, b, FILTER_SANITIZE_URL));
-var_dump(input_get(INPUT_GET, a, FILTER_SANITIZE_SPECIAL_CHARS, 
array(1,2,3,4,5)));
-var_dump(input_get(INPUT_GET, b, FILTER_VALIDATE_FLOAT, new stdClass));
-var_dump(input_get(INPUT_POST, c, FILTER_SANITIZE_STRIPPED, array(5,6,7,8)));
-var_dump(input_get(INPUT_POST, d, FILTER_VALIDATE_FLOAT));
-var_dump(input_get(INPUT_POST, c, FILTER_SANITIZE_SPECIAL_CHARS));
-var_dump(input_get(INPUT_POST, d, FILTER_VALIDATE_INT));
-
-var_dump(input_get(new stdClass, d));
-
-var_dump(input_get(INPUT_POST, c, , ));
-var_dump(input_get(, , , , ));
-var_dump(input_get(0, 0, 

[PHP-CVS] cvs: php-src /ext/filter/tests 007.phpt 011.phpt 014.phpt 033.phpt 033_run.inc 033_run.php

2006-07-19 Thread Antony Dovgal
tony2001Wed Jul 19 08:25:45 2006 UTC

  Added files: 
/php-src/ext/filter/tests   033_run.inc 

  Removed files:   
/php-src/ext/filter/tests   033_run.php 

  Modified files:  
/php-src/ext/filter/tests   007.phpt 011.phpt 014.phpt 033.phpt 
  Log:
  fix tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/007.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/filter/tests/007.phpt
diff -u php-src/ext/filter/tests/007.phpt:1.1 
php-src/ext/filter/tests/007.phpt:1.2
--- php-src/ext/filter/tests/007.phpt:1.1   Tue Dec  6 15:18:56 2005
+++ php-src/ext/filter/tests/007.phpt   Wed Jul 19 08:25:45 2006
@@ -35,7 +35,6 @@
 bool(false)
 bool(false)
 bool(false)
-PHP Warning:  input_has_variable() expects parameter 2 to be string, array 
given in %s on line %d
 
 Warning: input_has_variable() expects parameter 2 to be string, array given in 
%s on line %d
 NULL
@@ -44,24 +43,19 @@
 bool(false)
 bool(false)
 bool(false)
-PHP Warning:  input_has_variable() expects parameter 2 to be string, array 
given in %s on line %d
 
 Warning: input_has_variable() expects parameter 2 to be string, array given in 
%s on line %d
 NULL
 bool(false)
-PHP Warning:  input_has_variable() expects parameter 1 to be long, string 
given in %s on line %d
 
 Warning: input_has_variable() expects parameter 1 to be long, string given in 
%s on line %d
 NULL
-PHP Warning:  input_has_variable() expects parameter 1 to be long, array given 
in %s on line %d
 
 Warning: input_has_variable() expects parameter 1 to be long, array given in 
%s on line %d
 NULL
-PHP Warning:  input_has_variable() expects parameter 1 to be long, array given 
in %s on line %d
 
 Warning: input_has_variable() expects parameter 1 to be long, array given in 
%s on line %d
 NULL
-PHP Warning:  input_has_variable() expects parameter 1 to be long, string 
given in %s on line %d
 
 Warning: input_has_variable() expects parameter 1 to be long, string given in 
%s on line %d
 NULL
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/011.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/filter/tests/011.phpt
diff -u php-src/ext/filter/tests/011.phpt:1.2 
php-src/ext/filter/tests/011.phpt:1.3
--- php-src/ext/filter/tests/011.phpt:1.2   Sat Jan 21 15:57:43 2006
+++ php-src/ext/filter/tests/011.phpt   Wed Jul 19 08:25:45 2006
@@ -28,22 +28,19 @@
 string(4) test
 string(18) http://example.com;
 string(27) #60;b#62;test#60;/b#62;
-NULL
+bool(false)
 string(6) string
 float(12345.7)
 string(29) #60;p#62;string#60;/p#62;
-NULL
-PHP Warning:  input_get() expects parameter 1 to be long, object given in %s 
on line %d
+bool(false)
 
 Warning: input_get() expects parameter 1 to be long, object given in %s on 
line %d
 NULL
-PHP Warning:  input_get() expects parameter 3 to be long, string given in %s 
on line %d
 
 Warning: input_get() expects parameter 3 to be long, string given in %s on 
line %d
 NULL
-PHP Warning:  input_get() expects parameter 1 to be long, string given in %s 
on line %d
 
 Warning: input_get() expects parameter 1 to be long, string given in %s on 
line %d
 NULL
-bool(false)
+NULL
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/014.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/filter/tests/014.phpt
diff -u php-src/ext/filter/tests/014.phpt:1.3 
php-src/ext/filter/tests/014.phpt:1.4
--- php-src/ext/filter/tests/014.phpt:1.3   Sat Jan 21 15:57:43 2006
+++ php-src/ext/filter/tests/014.phpt   Wed Jul 19 08:25:45 2006
@@ -3,8 +3,19 @@
 --FILE--
 ?php
 
+class test {
+
+   function __toString() {
+   return blah;
+   }
+}
+
+$t = new test;
+
 var_dump(filter_data(no, FILTER_VALIDATE_BOOLEAN));
-var_dump(filter_data(new stdClass, FILTER_VALIDATE_BOOLEAN));
+var_dump(filter_data(NULL, FILTER_VALIDATE_BOOLEAN));
+var_dump(filter_data($t, FILTER_VALIDATE_BOOLEAN));
+var_dump(filter_data(array(1,2,3,0,array(, 123)), 
FILTER_VALIDATE_BOOLEAN));
 var_dump(filter_data(yes, FILTER_VALIDATE_BOOLEAN));
 var_dump(filter_data(true, FILTER_VALIDATE_BOOLEAN));
 var_dump(filter_data(false, FILTER_VALIDATE_BOOLEAN));
@@ -23,9 +34,25 @@
 ?
 --EXPECTF--
 bool(false)
-
-Notice: Object of class stdClass to string conversion in %s on line %d
-NULL
+bool(false)
+bool(false)
+array(5) {
+  [0]=
+  bool(true)
+  [1]=
+  bool(false)
+  [2]=
+  bool(false)
+  [3]=
+  bool(false)
+  [4]=
+  array(2) {
+[0]=
+bool(false)
+[1]=
+bool(false)
+  }
+}
 bool(true)
 bool(true)
 bool(false)
@@ -33,9 +60,9 @@
 bool(true)
 bool(false)
 bool(true)
-NULL
 bool(false)
-NULL
-NULL
-NULL
+bool(false)
+bool(false)
+bool(false)
+bool(false)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/033.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/filter/tests/033.phpt
diff -u php-src/ext/filter/tests/033.phpt:1.3 
php-src/ext/filter/tests/033.phpt:1.4
--- php-src/ext/filter/tests/033.phpt:1.3   Thu May 25 11:13:23 2006
+++ php-src/ext/filter/tests/033.phpt   Wed