summaryrefslogtreecommitdiff
path: root/ext/filter/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/filter/tests')
-rw-r--r--ext/filter/tests/008.phpt6
-rw-r--r--ext/filter/tests/009.phpt23
-rw-r--r--ext/filter/tests/010.phpt16
-rw-r--r--ext/filter/tests/012.phpt6
-rw-r--r--ext/filter/tests/013.phpt32
-rw-r--r--ext/filter/tests/014.phpt8
-rw-r--r--ext/filter/tests/015.phpt14
-rw-r--r--ext/filter/tests/016.phpt12
-rw-r--r--ext/filter/tests/017.phpt8
-rw-r--r--ext/filter/tests/018.phpt20
-rw-r--r--ext/filter/tests/019.phpt10
-rw-r--r--ext/filter/tests/030.phpt2
-rw-r--r--ext/filter/tests/031.phpt6
-rw-r--r--ext/filter/tests/034.phpt4
-rw-r--r--ext/filter/tests/bug8315.phpt6
-rw-r--r--ext/filter/tests/filter_data.phpt8
16 files changed, 105 insertions, 76 deletions
diff --git a/ext/filter/tests/008.phpt b/ext/filter/tests/008.phpt
index 5f89910d79..9130c09481 100644
--- a/ext/filter/tests/008.phpt
+++ b/ext/filter/tests/008.phpt
@@ -47,7 +47,13 @@ array(18) {
[17]=>
string(8) "callback"
}
+<<<<<<< 008.phpt
+
+Warning: Wrong parameter count for filter_list() in /home4/php_dev/php52/ext/filter/tests/008.php on line 4
+NULL
+=======
Warning: Wrong parameter count for filter_list() in %s on line %d
NULL
+>>>>>>> 1.3
Done
diff --git a/ext/filter/tests/009.phpt b/ext/filter/tests/009.phpt
index d9d66be07e..80057d63aa 100644
--- a/ext/filter/tests/009.phpt
+++ b/ext/filter/tests/009.phpt
@@ -19,11 +19,34 @@ int(513)
int(513)
int(518)
int(257)
+<<<<<<< 009.phpt
bool(false)
Warning: filter_id() expects parameter 1 to be string, array given in %s on line %d
NULL
bool(false)
+=======
+bool(false)
+>>>>>>> 1.4
+
+<<<<<<< 009.phpt
+Warning: filter_id() expects exactly 1 parameter, 3 given in %s on line %d
+NULL
+Done
+--UEXPECTF--
+int(513)
+int(513)
+int(518)
+int(257)
+NULL
+
+Warning: input_name_to_filter() expects parameter 1 to be binary string, array given in %s on line %d
+NULL
+=======
+Warning: filter_id() expects parameter 1 to be string, array given in %s on line %d
+>>>>>>> 1.4
+NULL
+bool(false)
Warning: filter_id() expects exactly 1 parameter, 3 given in %s on line %d
NULL
diff --git a/ext/filter/tests/010.phpt b/ext/filter/tests/010.phpt
index 0de3467cec..d0a53c3a82 100644
--- a/ext/filter/tests/010.phpt
+++ b/ext/filter/tests/010.phpt
@@ -21,13 +21,13 @@ array(7) {
[1]=>
int(1)
[2]=>
- NULL
+ bool(false)
[3]=>
int(-23234)
[4]=>
- NULL
+ bool(false)
[5]=>
- NULL
+ bool(false)
[6]=>
array(0) {
}
@@ -38,20 +38,20 @@ array(7) {
[1]=>
float(1.7)
[2]=>
- NULL
+ bool(false)
[3]=>
float(-23234.123)
[4]=>
- NULL
+ bool(false)
[5]=>
- NULL
+ bool(false)
[6]=>
array(0) {
}
}
-Warning: filter_var() expects parameter 2 to be long, array given in %s on line %d
-bool(false)
+Warning: filter_var() expects parameter 2 to be long, array given in /home4/php_dev/php52/ext/filter/tests/010.php on line 5
+NULL
string(1) "1"
string(1) "1"
string(1) "1"
diff --git a/ext/filter/tests/012.phpt b/ext/filter/tests/012.phpt
index 103fd3c8f9..ef0525489f 100644
--- a/ext/filter/tests/012.phpt
+++ b/ext/filter/tests/012.phpt
@@ -10,7 +10,7 @@ var_dump(filter_input(INPUT_COOKIE, ""));
echo "Done\n";
?>
--EXPECT--
-bool(false)
-bool(false)
-bool(false)
+NULL
+NULL
+NULL
Done
diff --git a/ext/filter/tests/013.phpt b/ext/filter/tests/013.phpt
index d88145a6e7..55c71e3535 100644
--- a/ext/filter/tests/013.phpt
+++ b/ext/filter/tests/013.phpt
@@ -49,24 +49,24 @@ int(255)
int(7)
int(16711680)
int(438)
-NULL
+bool(false)
int(0)
int(0)
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
int(6)
-NULL
-NULL
+bool(false)
+bool(false)
int(-1)
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
Done
diff --git a/ext/filter/tests/014.phpt b/ext/filter/tests/014.phpt
index f12eac0ed4..77e4d25575 100644
--- a/ext/filter/tests/014.phpt
+++ b/ext/filter/tests/014.phpt
@@ -32,9 +32,9 @@ var_dump(filter_var("111111", FILTER_VALIDATE_BOOLEAN));
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
+bool(false)
bool(false)
-NULL
bool(false)
array(5) {
[0]=>
@@ -48,7 +48,7 @@ array(5) {
[4]=>
array(2) {
[0]=>
- NULL
+ bool(false)
[1]=>
bool(false)
}
@@ -61,7 +61,7 @@ bool(true)
bool(false)
bool(true)
bool(false)
-NULL
+bool(false)
bool(false)
bool(false)
bool(false)
diff --git a/ext/filter/tests/015.phpt b/ext/filter/tests/015.phpt
index 67c506f3d0..edde095e75 100644
--- a/ext/filter/tests/015.phpt
+++ b/ext/filter/tests/015.phpt
@@ -40,7 +40,7 @@ var_dump(filter_var("http://www.example.com/index.php?a=b&c=d", FILTER_VALIDATE_
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
string(29) "http://example.com/index.html"
string(32) "http://www.example.com/index.php"
string(31) "http://www.example/img/test.png"
@@ -52,20 +52,20 @@ string(18) "file:///tmp/test.c"
string(26) "ftp://ftp.example.com/tmp/"
string(11) "/tmp/test.c"
string(1) "/"
-NULL
+bool(false)
string(6) "http:/"
string(5) "http:"
string(4) "http"
string(0) ""
string(2) "-1"
bool(false)
-NULL
+bool(false)
string(10) "http://qwe"
-NULL
-NULL
+bool(false)
+bool(false)
string(22) "http://www.example.com"
-NULL
+bool(false)
string(42) "http://www.example.com/path/at/the/server/"
-NULL
+bool(false)
string(40) "http://www.example.com/index.php?a=b&c=d"
Done
diff --git a/ext/filter/tests/016.phpt b/ext/filter/tests/016.phpt
index d1c959c119..67921f0188 100644
--- a/ext/filter/tests/016.phpt
+++ b/ext/filter/tests/016.phpt
@@ -22,11 +22,11 @@ echo "Done\n";
--EXPECT--
string(5) "a@b.c"
string(17) "abuse@example.com"
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
string(57) "QWERTYUIOPASDFGHJKLZXCVBNM@QWERTYUIOPASDFGHJKLZXCVBNM.NET"
Done
diff --git a/ext/filter/tests/017.phpt b/ext/filter/tests/017.phpt
index 2b2d9de889..661dfe40ff 100644
--- a/ext/filter/tests/017.phpt
+++ b/ext/filter/tests/017.phpt
@@ -14,11 +14,11 @@ echo "Done\n";
?>
--EXPECTF--
string(4) "data"
-NULL
+bool(false)
string(4) "data"
-NULL
-NULL
+bool(false)
+bool(false)
Warning: filter_var(): 'regexp' option missing in %s on line %d
-NULL
+bool(false)
Done
diff --git a/ext/filter/tests/018.phpt b/ext/filter/tests/018.phpt
index 5b0b16da28..7ea17b329c 100644
--- a/ext/filter/tests/018.phpt
+++ b/ext/filter/tests/018.phpt
@@ -27,24 +27,24 @@ echo "Done\n";
?>
--EXPECT--
string(11) "192.168.0.1"
-NULL
+bool(false)
string(3) "::1"
string(7) "fe00::0"
-NULL
-NULL
+bool(false)
+bool(false)
string(9) "127.0.0.1"
-NULL
+bool(false)
string(12) "192.0.34.166"
string(9) "127.0.0.1"
string(9) "192.0.0.1"
string(12) "192.0.34.166"
-NULL
+bool(false)
string(15) "255.255.255.255"
-NULL
-NULL
-NULL
-NULL
-NULL
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
string(3) "::1"
string(9) "127.0.0.1"
Done
diff --git a/ext/filter/tests/019.phpt b/ext/filter/tests/019.phpt
index e8c85c8243..5a20ff8211 100644
--- a/ext/filter/tests/019.phpt
+++ b/ext/filter/tests/019.phpt
@@ -11,10 +11,10 @@ var_dump(filter_var("1.1.1.1", FILTER_VALIDATE_IP));
echo "Done\n";
?>
---EXPECTF--
-NULL
-NULL
-NULL
-NULL
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
string(7) "1.1.1.1"
Done
diff --git a/ext/filter/tests/030.phpt b/ext/filter/tests/030.phpt
index 257d1d6cbd..97b62b9e26 100644
--- a/ext/filter/tests/030.phpt
+++ b/ext/filter/tests/030.phpt
@@ -23,7 +23,7 @@ $ipv6_test = array(
);
foreach ($ipv6_test as $ip => $exp) {
$out = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
- $out = (int) ($out === null ? 0 : 1);
+ $out = (int) ($out === false ? 0 : 1);
if ($exp != $out) {
echo "$ip failed\n";
}
diff --git a/ext/filter/tests/031.phpt b/ext/filter/tests/031.phpt
index 81dcc1c0e9..74883b8b26 100644
--- a/ext/filter/tests/031.phpt
+++ b/ext/filter/tests/031.phpt
@@ -45,10 +45,10 @@ float(7000)
float(0.007)
custom decimal:
-NULL
+bool(false)
float(1.234)
float(1.234)
Warning: filter_var(): decimal separator must be one char in %s on line %d
-NULL
-NULL
+bool(false)
+bool(false)
diff --git a/ext/filter/tests/034.phpt b/ext/filter/tests/034.phpt
index a041786639..f96596d7c3 100644
--- a/ext/filter/tests/034.phpt
+++ b/ext/filter/tests/034.phpt
@@ -16,12 +16,12 @@ $booleans = array(
'faLsE' => false,
'oFf' => false,
-'' => null
+'' => false
);
foreach($booleans as $val=>$exp) {
$res =filter_var($val, FILTER_VALIDATE_BOOLEAN);
- if ($res !== $exp) {
+ if ($res !== $exp) {
echo "$val failed,'$exp' expect, '$res' received.\n";
}
}
diff --git a/ext/filter/tests/bug8315.phpt b/ext/filter/tests/bug8315.phpt
index ae2ac45f85..ab1a0937ed 100644
--- a/ext/filter/tests/bug8315.phpt
+++ b/ext/filter/tests/bug8315.phpt
@@ -8,6 +8,6 @@ var_dump(filter_var($var, FILTER_VALIDATE_INT));
$var="3".chr(0)."foo";
var_dump(filter_var($var, FILTER_VALIDATE_FLOAT));
?>
---EXPECTF--
-NULL
-NULL
+--EXPECT--
+bool(false)
+bool(false)
diff --git a/ext/filter/tests/filter_data.phpt b/ext/filter/tests/filter_data.phpt
index 9ae9ab17bf..14e8545c9b 100644
--- a/ext/filter/tests/filter_data.phpt
+++ b/ext/filter/tests/filter_data.phpt
@@ -46,7 +46,7 @@ int(123)
int(-123)
int(0)
int(123)
-NULL
+bool(false)
float(-0.123)
float(0)
@@ -54,7 +54,7 @@ float(1.23)
float(-1.23)
float(0)
float(1.23)
-NULL
+bool(false)
bool(true)
bool(false)
@@ -67,5 +67,5 @@ bool(false)
bool(true)
bool(false)
bool(true)
-NULL
-NULL
+bool(false)
+bool(false)