mirror of
https://github.com/php/php-src.git
synced 2026-04-25 08:58:28 +02:00
fix tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -28,22 +28,19 @@ echo "Done\n";
|
||||
string(4) "test"
|
||||
string(18) "http://example.com"
|
||||
string(27) "<b>test</b>"
|
||||
NULL
|
||||
bool(false)
|
||||
string(6) "string"
|
||||
float(12345.7)
|
||||
string(29) "<p>string</p>"
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user