pajoye          Thu Aug 31 16:13:39 2006 UTC

  Added files:                 
    /php-src/ext/filter/tests   035.phpt 
  Log:
  - 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)
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/035.phpt?view=markup&rev=1.1
Index: php-src/ext/filter/tests/035.phpt
+++ php-src/ext/filter/tests/035.phpt
--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)
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to