]> granicus.if.org Git - php/commitdiff
fix tests
authorAntony Dovgal <tony2001@php.net>
Wed, 19 Jul 2006 08:25:45 +0000 (08:25 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 19 Jul 2006 08:25:45 +0000 (08:25 +0000)
ext/filter/tests/007.phpt
ext/filter/tests/011.phpt
ext/filter/tests/014.phpt
ext/filter/tests/033.phpt
ext/filter/tests/033_run.inc [moved from ext/filter/tests/033_run.php with 100% similarity]

index ffc727801d9267ae601b706ca1443b36b7c0fccc..d751c1ea6c6146f4bfbe319198f3d7667bd44520 100644 (file)
@@ -35,7 +35,6 @@ bool(true)
 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(true)
 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
index 0d3fa42745e860dff49445cf213eea2edb5cc011..f71436d9e4677782642e9d41310a852ea0f5a76e 100644 (file)
@@ -28,22 +28,19 @@ echo "Done\n";
 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
index f31fe6e9f4e84d575802f837eb7d849afce51445..aab2e7979ba9793c1a1e2b82c02ea182cded2643 100644 (file)
@@ -3,8 +3,19 @@ filter_data() and FILTER_VALIDATE_BOOLEAN
 --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 @@ echo "Done\n";
 ?>
 --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(false)
 bool(true)
 bool(false)
 bool(true)
-NULL
 bool(false)
-NULL
-NULL
-NULL
+bool(false)
+bool(false)
+bool(false)
+bool(false)
 Done
index c6ec13323e851e22a189949dd613028aae5d270d..c8a82db5f5557adf16ba45ff1c9b7091e9b1db9d 100644 (file)
@@ -2,7 +2,7 @@
 Test all filters returned by input_filters_list()
 --FILE--
 <?php
-include dirname(__FILE__) . '/033_run.php';
+include dirname(__FILE__) . '/033_run.inc';
 ?>
 --EXPECT--     
 int                      1                                               123