- add a test for input_get and array

This test fails now. When the input variable is an array, its contents
  is replace by the filter result. To be fixed asap (before 5.2.0)
This commit is contained in:
Pierre Joye 2006-08-31 16:13:39 +00:00
parent 1fea711ac4
commit d10b686b6e

35
ext/filter/tests/035.phpt Normal file
View File

@ -0,0 +1,35 @@
--TEST--
GET/POST/REQUEST Test with input_get
--POST--
d=379
--GET--
ar[elm1]=1234&ar[elm2]=0660&a=0234
--FILE--
<?php
$ret = input_get(INPUT_GET, 'a', FILTER_VALIDATE_INT);
var_dump($ret);
$ret = input_get(INPUT_GET, 'a', FILTER_VALIDATE_INT, array('flags'=>FILTER_FLAG_ALLOW_OCTAL));
var_dump($ret);
$ret = input_get(INPUT_GET, 'ar', FILTER_VALIDATE_INT);
var_dump($ret);
$ret = input_get(INPUT_GET, 'ar', FILTER_VALIDATE_INT, array('flags'=>FILTER_FLAG_ALLOW_OCTAL));
var_dump($ret);
?>
--EXPECT--
bool(false)
int(156)
array(2) {
["elm1"]=>
int(1234)
["elm2"]=>
bool(false)
}
array(2) {
["elm1"]=>
int(1234)
["elm2"]=>
int(432)
}